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).

-- 
                                                 Gilles.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to