unset __THREAD_S_SAFE for thobj->status when the priority of the task is lower than then priority of the current task.
Signed-off-by: Kim De Mey <kim.de...@gmail.com> --- lib/copperplate/threadobj.c | 4 +++- 1 files changed, 3 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 @@ -929,8 +929,10 @@ int threadobj_start(struct threadobj *th thobj->status |= __THREAD_S_STARTED|__THREAD_S_SAFE; __RT(pthread_cond_signal(&thobj->barrier)); - if (current && thobj->priority <= current->priority) + if (current && thobj->priority <= current->priority) { + thobj->status &= ~__THREAD_S_SAFE; return 0; + } /* * Caller needs synchronization with the thread being started, _______________________________________________ Xenomai mailing list Xenomai@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai