diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-01-28 11:51:50 -0500 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-01-28 11:51:50 -0500 |
| commit | dd7350fb8c1e845351f2d3c9ccb186ab8aee8603 (patch) | |
| tree | 2f00e76104dbe41e84d39370180e1cf82b0c4f88 /src | |
| parent | ea71ba9e1275495edf9b03b7109fe290d959a47a (diff) | |
core: add gettid() system call
We need the system call to enable multi-threaded real-time applications,
and libc doesn't provide it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/syscalls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/syscalls.c b/src/syscalls.c index a42fc62..3b2f76c 100644 --- a/src/syscalls.c +++ b/src/syscalls.c | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | */ | 3 | */ |
| 4 | #define _GNU_SOURCE | 4 | #define _GNU_SOURCE |
| 5 | #include <unistd.h> | 5 | #include <unistd.h> |
| 6 | #include <linux/unistd.h> | ||
| 7 | #include <sys/types.h> | ||
| 6 | 8 | ||
| 7 | #include "litmus.h" | 9 | #include "litmus.h" |
| 8 | 10 | ||
| @@ -36,6 +38,9 @@ struct np_flag; | |||
| 36 | #define __NR_task_mode 343 | 38 | #define __NR_task_mode 343 |
| 37 | 39 | ||
| 38 | /* Syscall stub for setting RT mode and scheduling options */ | 40 | /* Syscall stub for setting RT mode and scheduling options */ |
| 41 | |||
| 42 | _syscall0(pid_t, gettid); | ||
| 43 | |||
| 39 | _syscall0(spolicy, sched_getpolicy); | 44 | _syscall0(spolicy, sched_getpolicy); |
| 40 | _syscall1(int, set_rt_mode, int, arg1); | 45 | _syscall1(int, set_rt_mode, int, arg1); |
| 41 | _syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1); | 46 | _syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1); |
