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: Wait on multiple objects


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


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