Jan Kiszka wrote:
> Hi,
> this is so far a mind experiment combined with an untested patch:
> [Assuming priority lists, the following is irrelevant for O(1) sched-queues]
> Consider we have some bulk of threads with varying priorities waiting on
> a xnsynch object. Typically, they are queued in priority order, the
> highest prio thread at the head. When we wake them up all at once via
> xnsynch_flush, we iterate from high to low prio threads.
> Waking up includes inserting those threads in the ready queue(s), again
> the highest prio thread first. On wake up of the first waiting thread we
> will only have to skip those threads in the ready queue that have higher
> priorities. For the second thread we already have to skip the first one
> as well on insert if it isn't of the same priority. One may continue
> this workflow...

Forget about this, there was a sign mistake: ready-queue walk already
takes place in the reverse order (from lower to higher prios), thus with
minimal iterations for the sketched scenario. Time to go home...


Attachment: signature.asc
Description: OpenPGP digital signature

Xenomai-core mailing list

Reply via email to