diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-01-24 15:53:27 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-01-24 15:53:27 -0500 |
commit | a155ee1ccb51cf8b6746bcd44ab34f258c9802e0 (patch) | |
tree | 338b7964ff68b9d9e23eabb4d3224887105967ec /src | |
parent | ffbf95ed8f7a861f3dd4de8d359b734fd9b6e2dd (diff) |
make kface thread safe
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel_iface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/kernel_iface.c b/src/kernel_iface.c index 5751ca6..35c84b6 100644 --- a/src/kernel_iface.c +++ b/src/kernel_iface.c | |||
@@ -3,6 +3,9 @@ | |||
3 | #include "litmus.h" | 3 | #include "litmus.h" |
4 | #include "internal.h" | 4 | #include "internal.h" |
5 | 5 | ||
6 | /* per real-time thread kernel <-> user space flags */ | ||
7 | |||
8 | |||
6 | struct np_flag { | 9 | struct np_flag { |
7 | #define RT_PREEMPTIVE 0x2050 /* = NP */ | 10 | #define RT_PREEMPTIVE 0x2050 /* = NP */ |
8 | #define RT_NON_PREEMPTIVE 0x4e50 /* = P */ | 11 | #define RT_NON_PREEMPTIVE 0x4e50 /* = P */ |
@@ -19,7 +22,7 @@ int signal_exit_np(void); | |||
19 | 22 | ||
20 | 23 | ||
21 | 24 | ||
22 | static struct np_flag np_flag; | 25 | static __thread struct np_flag np_flag; |
23 | 26 | ||
24 | 27 | ||
25 | int init_kernel_iface(void) | 28 | int init_kernel_iface(void) |