This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Waiting I/O operation
- From: cetoni GmbH - Uwe Kindler <uwe dot kindler at cetoni dot de>
- To: ecos-discuss at sourceware dot org
- Cc: Alexey Shusharin <mrfinch at mail dot ru>
- Date: Thu, 19 Jul 2007 10:45:34 +0200
- Subject: [ECOS] Re: Waiting I/O operation
Hello Alexey,
In my opinion you should go with the second thread solution. If you use
callbacks, then this callback will be called from the CAN I/O driver in
DSR context. If your thread waits for multiple events then you need to
use flags to signal the received CAN event.
I don't know if it is allowed to use flags from within DSRs but I
believe you can not use them and then also a callback solution would not
solve your problem. Your callback would need to wakup a "service thread"
that would signal the flag to the waiting thread - but then you would
also need two threads.
Or what would you do in this callback to wake up the thead - maybe I
missed something?
Regards, Uwe
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss