aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2009-04-29 11:49:42 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2009-04-29 11:49:42 -0400
commitde404246b3143ac0aa223654b6befebe1667eae6 (patch)
tree6de0955e1220dbebcb541de583288937e5ce8203 /src
parent6d41814d9081d659b79e3a90d6e84e3db5bed6c6 (diff)
sparc64: disable np-flag support
Doesn't work reliably right now anyway.
Diffstat (limited to 'src')
-rw-r--r--src/kernel_iface.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/kernel_iface.c b/src/kernel_iface.c
index d29c652..e5bf1ea 100644
--- a/src/kernel_iface.c
+++ b/src/kernel_iface.c
@@ -22,33 +22,40 @@ int register_np_flag(struct np_flag* flag);
22int signal_exit_np(void); 22int signal_exit_np(void);
23 23
24 24
25 25#ifndef __sparc__
26static __thread struct np_flag np_flag; 26static __thread struct np_flag np_flag;
27 27#endif
28 28
29int init_kernel_iface(void) 29int init_kernel_iface(void)
30{ 30{
31 int ret; 31 int ret = 0;
32#ifndef __sparc__ /* currently not supported in sparc64 */
32 np_flag.preemptivity = RT_PREEMPTIVE; 33 np_flag.preemptivity = RT_PREEMPTIVE;
33 np_flag.ctr = 0; 34 np_flag.ctr = 0;
34 ret = register_np_flag(&np_flag); 35 ret = register_np_flag(&np_flag);
35 check("register_np_flag()"); 36 check("register_np_flag()");
37#endif
36 return ret; 38 return ret;
37} 39}
38 40
39void enter_np(void) 41void enter_np(void)
40{ 42{
43#ifndef __sparc__
41 if (++np_flag.ctr == 1) 44 if (++np_flag.ctr == 1)
42 { 45 {
43 np_flag.request = 0; 46 np_flag.request = 0;
44 barrier(); 47 barrier();
45 np_flag.preemptivity = RT_NON_PREEMPTIVE; 48 np_flag.preemptivity = RT_NON_PREEMPTIVE;
46 } 49 }
50#else
51 fprintf(stderr, "enter_np: not implemented!\n");
52#endif
47} 53}
48 54
49 55
50void exit_np(void) 56void exit_np(void)
51{ 57{
58#ifndef __sparc__
52 if (--np_flag.ctr == 0) 59 if (--np_flag.ctr == 0)
53 { 60 {
54 np_flag.preemptivity = RT_PREEMPTIVE; 61 np_flag.preemptivity = RT_PREEMPTIVE;
@@ -56,5 +63,8 @@ void exit_np(void)
56 if (np_flag.request == RT_EXIT_NP_REQUESTED) 63 if (np_flag.request == RT_EXIT_NP_REQUESTED)
57 signal_exit_np(); 64 signal_exit_np();
58 } 65 }
66#else
67 fprintf(stderr, "exit_np: not implemented!\n");
68#endif
59} 69}
60 70