Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
>> decision (we could store the first pending thread priority in a
>> user/kernel shared area, with the complication that we would need
>> updating this priority if it ever changes, but to get the priority of
>> the current thread, we also need a syscall, moreover switching to
>> secondary mode).
> 
> I'm not thinking about the case where there is already someone waiting.
> That will need a kernel entry anyway (the low-prio waiter may sit on
> some other CPU...). But in case signaling always happens before pending,
> there is no need at all to consult the kernel.

In this case, you can avoid calling pthread_cond_signal at all... So, if
you are stupid enough to call pthread_cond_signal when no-one is
waiting, you deserve a syscall anyway.

-- 
                                                 Gilles.

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

Reply via email to