[ECOS] cyg_semaphore_post

Stijn Symons stijn.symons@acunia.com
Mon Feb 11 04:37:00 GMT 2002


> The documentation says:
>
> "If there are threads waiting on this semaphore this will make exactly
> one of then. Otherwise it simply increments the semaphore count".
>
> So that answers 1/2 of your question.
>
>

Indeed, I'll read more carefull the next time ;-)


>
> Reading the code, it looks like post takes from the head of the
> queue. It does not look like the queue is prioritized.
>
> Thinking about it, i'm not sure priorities make sense. Could you
> explain what you mean and how you would use them.
>
>        Andrew

I'm mapping an API to eCos, the API states that  "When any threads are
waiting on the semaphore count to become higher than zero, the thread with
the highest priority will be woken up to acquire the semaphore".

Stijn


Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list