diff options
Diffstat (limited to 'src/syscalls.c')
-rw-r--r-- | src/syscalls.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/src/syscalls.c b/src/syscalls.c index 77a6277..d800141 100644 --- a/src/syscalls.c +++ b/src/syscalls.c | |||
@@ -1,13 +1,16 @@ | |||
1 | /* To get syscall() we need to define _GNU_SOURCE | 1 | /* To get syscall() we need to define _GNU_SOURCE |
2 | * in modern glibc versions. | 2 | * in modern glibc versions. |
3 | */ | 3 | */ |
4 | |||
5 | /* imported from the kernel source tree */ | ||
6 | #include "asm/unistd.h" | ||
7 | |||
8 | /* for syscall() */ | ||
4 | #include <unistd.h> | 9 | #include <unistd.h> |
5 | #include <linux/unistd.h> | ||
6 | #include <sys/types.h> | ||
7 | 10 | ||
8 | #include "litmus.h" | 11 | //#include <sys/types.h> |
9 | 12 | ||
10 | struct np_flag; | 13 | #include "litmus.h" |
11 | 14 | ||
12 | /* Syscall stub for setting RT mode and scheduling options */ | 15 | /* Syscall stub for setting RT mode and scheduling options */ |
13 | 16 | ||
@@ -41,24 +44,14 @@ int od_close(int od) | |||
41 | return syscall(__NR_od_close, od); | 44 | return syscall(__NR_od_close, od); |
42 | } | 45 | } |
43 | 46 | ||
44 | int fmlp_down(int od) | 47 | int litmus_lock(int od) |
45 | { | ||
46 | return syscall(__NR_fmlp_down, od); | ||
47 | } | ||
48 | |||
49 | int fmlp_up(int od) | ||
50 | { | ||
51 | return syscall(__NR_fmlp_up, od); | ||
52 | } | ||
53 | |||
54 | int srp_down(int od) | ||
55 | { | 48 | { |
56 | return syscall(__NR_srp_down, od); | 49 | return syscall(__NR_litmus_lock, od); |
57 | } | 50 | } |
58 | 51 | ||
59 | int srp_up(int od) | 52 | int litmus_unlock(int od) |
60 | { | 53 | { |
61 | return syscall(__NR_srp_up, od); | 54 | return syscall(__NR_litmus_unlock, od); |
62 | } | 55 | } |
63 | 56 | ||
64 | int get_job_no(unsigned int *job_no) | 57 | int get_job_no(unsigned int *job_no) |