diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-04-17 21:29:42 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-04-17 21:29:42 -0400 |
commit | 2598391816bc260d52d77d4cf55b772b39bba72f (patch) | |
tree | 3e7d430a862b3e4aaef68d10217d1c4aba57b306 /include | |
parent | 81759c3a5de3a55bca0593ab1bc592d9c3f5dfc0 (diff) |
Add enter_np/exit_np callbacks for non-preemptable sections support
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched_plugin.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/sched_plugin.h b/include/linux/sched_plugin.h index 5c223695ab..3926388a0f 100644 --- a/include/linux/sched_plugin.h +++ b/include/linux/sched_plugin.h | |||
@@ -56,6 +56,12 @@ typedef void (*task_blocks_t) (struct task_struct *task); | |||
56 | /* called when a real-time task exits. Free any allocated resources */ | 56 | /* called when a real-time task exits. Free any allocated resources */ |
57 | typedef long (*tear_down_t) (struct task_struct *); | 57 | typedef long (*tear_down_t) (struct task_struct *); |
58 | 58 | ||
59 | /* called when a real-time task wants to enter a non-preemptable section */ | ||
60 | typedef long (*enter_np_t) (struct task_struct *); | ||
61 | /* called when a real-time task wants to leave a non-preemptable section */ | ||
62 | typedef long (*exit_np_t) (struct task_struct *); | ||
63 | |||
64 | |||
59 | 65 | ||
60 | /********************* sys call backends ********************/ | 66 | /********************* sys call backends ********************/ |
61 | /* This function causes the caller to sleep until the next release */ | 67 | /* This function causes the caller to sleep until the next release */ |
@@ -89,6 +95,10 @@ struct sched_plugin { | |||
89 | wake_up_task_t wake_up_task; | 95 | wake_up_task_t wake_up_task; |
90 | task_blocks_t task_blocks; | 96 | task_blocks_t task_blocks; |
91 | tear_down_t tear_down; | 97 | tear_down_t tear_down; |
98 | |||
99 | /* non-preemptable sections */ | ||
100 | enter_np_t enter_np; | ||
101 | exit_np_t exit_np; | ||
92 | } __attribute__ ((__aligned__(SMP_CACHE_BYTES))); | 102 | } __attribute__ ((__aligned__(SMP_CACHE_BYTES))); |
93 | 103 | ||
94 | typedef struct sched_plugin sched_plugin_t; | 104 | typedef struct sched_plugin sched_plugin_t; |