This is the mail archive of the 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 question about a specific example made me go back and ask the
core s/w team what specific implementation they were looking for
with this priority based wakeup scheme.  we are rewriting some of
the code as well as porting.  
basically, the current s/w does not use multiple priorities, but
their plan is to have "task rendezvous" events in which a
particular event needs to occur before a series of threads must
run each with their associated functionality. the threads don't
depend on each other (just that an event occurred) but have
definite priorities among themselves.  an example might be when a
STOP or REVERSE command occurs with a DVD player.  a series of
internal threads must cleanup now that PLAY is no longer the
state, and the Video is the highest priority, with audio coming
next and then so on.
that's all i can give as an example right now, but perhaps we
don't need this functionality when we get further down the design
and implementation phases.  and perhaps the mutex as robin
indicated might be sufficient. thanks for all the information,
and i'll give more specific info when i have the example.

>You might try a mutex, a condition variable and an appropriate
>inversion protection protocol instead of a counting semaphore.



On Mon, Feb 11, 2002 at 09:10:16AM -0600, Woller, Thomas wrote:
> 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.

OK. You use this sort of Semaphore. You should be able to answer
question... to me it still does not make sense. Why do you want
prioritization on what gets woken up? Please can you give an


Before posting, please read the FAQ:
and search the list archive:

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