fix main thread
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2013-06-12 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
* chopstx.c (chx_init): Inhibit preemption for main thread.
|
||||
|
||||
2013-06-11 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
* chopstx.c (chx_timer_expired): Use uint16_t here.
|
||||
|
||||
@@ -724,10 +724,15 @@ chx_init (struct chx_thread *tp)
|
||||
tp->flag_got_cancel = tp->flag_join_req = 0;
|
||||
tp->flag_sched_rr = (CHX_FLAGS_MAIN & CHOPSTX_SCHED_RR)? 1 : 0;
|
||||
tp->flag_detached = (CHX_FLAGS_MAIN & CHOPSTX_DETACHED)? 1 : 0;
|
||||
tp->prio_orig = tp->prio = CHX_PRIO_MAIN;
|
||||
tp->prio_orig = CHX_PRIO_MAIN;
|
||||
tp->prio = 0;
|
||||
tp->v = 0;
|
||||
|
||||
running = tp;
|
||||
|
||||
if (CHX_PRIO_MAIN >= CHOPSTX_PRIO_INHIBIT_PREEMPTION)
|
||||
chx_cpu_sched_lock ();
|
||||
|
||||
tp->prio = CHX_PRIO_MAIN;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user