This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: cyg_semaphore_post
On Mon, 2002-02-11 at 16:10, Woller, Thomas wrote:
> we are also wondering how to handle the non-priority based (ie.
> FIFO based) waiting under eCos. when there are a series of
> threads waiting on the same semaphore, we basically want the
> highest priority thread to run, NOT the first one that happened
> to wait on the semaphore. some of our current s/w on another
> RTOS that we are porting over currently supports both FIFO and
> priority based semaphores/mutexes. so we think that core
> modifications are the only option we have. we could just allow
> the lower priority threads, that are first on the FIFO, to cycle
> out with context switches at the most every system tick. not sure
> if this is going to be too much latency for the higher priority
> thread though, we'll have to test and see.
> tom
>
You might try a mutex, a condition variable and an appropriate priority
inversion protection protocol instead of a counting semaphore.
[snip]
Robin
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss