diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-07-01 09:50:35 -0400 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-07-01 09:50:35 -0400 |
| commit | 7364a4bcb88e6c1291a9a8af097a139e84eebace (patch) | |
| tree | 6966d224880a26a7c0a0a729b731c901f938177a /include | |
| parent | c70e2aa039b3f05bd9c520a66dd9af8b405b19b8 (diff) | |
don't include NP-Flag syscalls if config option is not selected
Diffstat (limited to 'include')
| -rw-r--r-- | include/litmus/litmus.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h index ca9d3c8d88..8a4c44999f 100644 --- a/include/litmus/litmus.h +++ b/include/litmus/litmus.h | |||
| @@ -86,13 +86,6 @@ void list_qsort(struct list_head* list, list_cmp_t less_than); | |||
| 86 | #define RT_NON_PREEMPTIVE 0x4e50 /* = P */ | 86 | #define RT_NON_PREEMPTIVE 0x4e50 /* = P */ |
| 87 | #define RT_EXIT_NP_REQUESTED 0x5251 /* = RQ */ | 87 | #define RT_EXIT_NP_REQUESTED 0x5251 /* = RQ */ |
| 88 | 88 | ||
| 89 | /* returns 1 if task t has registered np flag and set it to RT_NON_PREEMPTIVE | ||
| 90 | */ | ||
| 91 | int is_np(struct task_struct *t); | ||
| 92 | |||
| 93 | /* request that the task should call sys_exit_np() | ||
| 94 | */ | ||
| 95 | void request_exit_np(struct task_struct *t); | ||
| 96 | 89 | ||
| 97 | /* kill naughty tasks | 90 | /* kill naughty tasks |
| 98 | */ | 91 | */ |
| @@ -183,4 +176,26 @@ void srp_ceiling_block(void); | |||
| 183 | 176 | ||
| 184 | #define heap2task(hn) ((struct task_struct*) hn->value) | 177 | #define heap2task(hn) ((struct task_struct*) hn->value) |
| 185 | 178 | ||
| 179 | |||
| 180 | #ifdef CONFIG_NP_SECTION | ||
| 181 | /* returns 1 if task t has registered np flag and set it to RT_NON_PREEMPTIVE | ||
| 182 | */ | ||
| 183 | int is_np(struct task_struct *t); | ||
| 184 | |||
| 185 | /* request that the task should call sys_exit_np() | ||
| 186 | */ | ||
| 187 | void request_exit_np(struct task_struct *t); | ||
| 188 | |||
| 189 | #else | ||
| 190 | |||
| 191 | static inline int is_np(struct task_struct *t) | ||
| 192 | { | ||
| 193 | return tsk_rt(t)->kernel_np; | ||
| 194 | } | ||
| 195 | |||
| 196 | #define request_exit_np(t) | ||
| 197 | |||
| 198 | #endif | ||
| 199 | |||
| 200 | |||
| 186 | #endif | 201 | #endif |
