Do not set __THREAD_S_SAFE for thobj->status when the priority of the task is lower than the priority of the current task.
Signed-off-by: Kim De Mey <kim.de...@gmail.com> --- lib/copperplate/threadobj.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/copperplate/threadobj.c b/lib/copperplate/threadobj.c --- a/lib/copperplate/threadobj.c +++ b/lib/copperplate/threadobj.c @@ -926,7 +926,7 @@ int threadobj_start(struct threadobj *th if (thobj->status & __THREAD_S_STARTED) return 0; - thobj->status |= __THREAD_S_STARTED|__THREAD_S_SAFE; + thobj->status |= __THREAD_S_STARTED; __RT(pthread_cond_signal(&thobj->barrier)); if (current && thobj->priority <= current->priority) @@ -943,6 +943,7 @@ int threadobj_start(struct threadobj *th */ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate); + thobj->status |= __THREAD_S_SAFE; wait_on_barrier(thobj, __THREAD_S_ACTIVE); thobj->status &= ~__THREAD_S_SAFE; _______________________________________________ Xenomai mailing list Xenomai@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai