diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-07-28 01:28:57 -0400 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-07-28 01:28:57 -0400 |
| commit | f98c7ac54999edd46d27c06efacdcb92c48c00e0 (patch) | |
| tree | 29b773cd4e17af9f341c9e124115918c93f1d95e | |
| parent | b4f45e13cef755fde11f23fed2c84006defe2cc9 (diff) | |
export np-section preemption flag
| -rw-r--r-- | include/litmus.h | 1 | ||||
| -rw-r--r-- | src/kernel_iface.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h index 0371a6c..7e5092b 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
| @@ -106,6 +106,7 @@ task_class_t str2class(const char* str); | |||
| 106 | void enter_np(void); | 106 | void enter_np(void); |
| 107 | void exit_np(void); | 107 | void exit_np(void); |
| 108 | void exit_np_trace(void); | 108 | void exit_np_trace(void); |
| 109 | int requested_to_preempt(void); | ||
| 109 | 110 | ||
| 110 | /* task system support */ | 111 | /* task system support */ |
| 111 | int wait_for_ts_release(void); | 112 | int wait_for_ts_release(void); |
diff --git a/src/kernel_iface.c b/src/kernel_iface.c index 34767ae..8ab42de 100644 --- a/src/kernel_iface.c +++ b/src/kernel_iface.c | |||
| @@ -84,6 +84,10 @@ void exit_np_trace(void) | |||
| 84 | } | 84 | } |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | int requested_to_preempt(void) | ||
| 88 | { | ||
| 89 | return (likely(ctrl_page != NULL) && ctrl_page->sched.np.preempt); | ||
| 90 | } | ||
| 87 | 91 | ||
| 88 | /* init and return a ptr to the control page for | 92 | /* init and return a ptr to the control page for |
| 89 | * preemption and migration overhead analysis | 93 | * preemption and migration overhead analysis |
