Gilles Chanteperdrix wrote: > 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.
Yes, algorithmically avoidable. OK, let's see if there is someone who actually has a need for it (legacy code...). Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux _______________________________________________ Xenomai-core mailing list [email protected] https://mail.gna.org/listinfo/xenomai-core
