Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164573
b: refs/heads/master
c: 2bace8b
h: refs/heads/master
i:
  164571: 6361c00
v: v3
  • Loading branch information
Christian Thaeter authored and Jiri Kosina committed Sep 21, 2009
1 parent 3eb267d commit 59e932c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8103b5cc6216d461047514d188248bd14873624a
refs/heads/master: 2bace8b95108746f6123d312f47f5bda4eb17a26
8 changes: 8 additions & 0 deletions trunk/Documentation/hwmon/hpfall.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <stdint.h>
#include <errno.h>
#include <signal.h>
#include <sys/mman.h>
#include <sched.h>

void write_int(char *path, int i)
{
Expand Down Expand Up @@ -62,13 +64,19 @@ void ignore_me(void)
int main(int argc, char *argv[])
{
int fd, ret;
struct sched_param param;

fd = open("/dev/freefall", O_RDONLY);
if (fd < 0) {
perror("open");
return EXIT_FAILURE;
}

daemon(0, 0);
param.sched_priority = sched_get_priority_max(SCHED_FIFO);
sched_setscheduler(0, SCHED_FIFO, &param);
mlockall(MCL_CURRENT|MCL_FUTURE);

signal(SIGALRM, ignore_me);

for (;;) {
Expand Down

0 comments on commit 59e932c

Please sign in to comment.