This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cyg_semaphore_post


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]