This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Wait on multiple objects
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Cc: "Ecos-List (E-mail)" <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 19 Feb 2003 19:06:05 +0000
- Subject: Re: [ECOS] Wait on multiple objects
- References: <9F77D654ED40B74CA79E5A60B97A087B042414@sd-exchange.sdesigns.com>
Fabrice Gautier wrote:
Well, I can only wait on one flag object right?
Yes, but that flag object has multiple bits. If something wants to notify
an event, it can set the relevant flag bit for itself and the waiter will
wake up... if something else wants to notify a different event it can set
a different flag bit, but the waiter still wakes up.
So if i have two (or more) modules that i want to control with flags then
they have to share a common flag. That's what the implementation of pselect
does also with a conditonnal variable i believe.
A common flag object, but different bits in the flag.
I guess there's not such thing yet in eCos. The principle to implement this
kind of feature look pretty simple, but i guess it would also be easy to
have many race conditions and other problems in the actual
implementation....
eCos's answer (other than select) is flags :-). It allows you to wait on
multiple different conditions, just like select.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss