Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
>> Jan Kiszka wrote:
>>> +   xnarch_atomic_set(mutex->owner,
>>> +                     set_claimed(xnthread_handle(owner),
>>> +                                 xnsynch_nsleepers(&mutex->synchbase)));
>> Ok. I think you have spotted a bug here. This should be mutex->sleepers
>> instead of xnsynch_nsleepers.
> BTW, why do you need to track sleepers separately in POSIX? Native
> doesn't do so, e.g.

Because of the "syscall-needed-when-unlocking-stolen-mutex" issue I
already explained (sleepers - xnsynch_nsleepers is precisely the count
of pending threads which have been awake then robbed the mutex).


Xenomai-core mailing list

Reply via email to