aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-28 01:28:57 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-28 01:28:57 -0400
commitf98c7ac54999edd46d27c06efacdcb92c48c00e0 (patch)
tree29b773cd4e17af9f341c9e124115918c93f1d95e
parentb4f45e13cef755fde11f23fed2c84006defe2cc9 (diff)
export np-section preemption flag
-rw-r--r--include/litmus.h1
-rw-r--r--src/kernel_iface.c4
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);
106void enter_np(void); 106void enter_np(void);
107void exit_np(void); 107void exit_np(void);
108void exit_np_trace(void); 108void exit_np_trace(void);
109int requested_to_preempt(void);
109 110
110/* task system support */ 111/* task system support */
111int wait_for_ts_release(void); 112int 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
87int 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