[uClinux-dev] Threading and synchronization questions
mschnell at lumino.de
Fri Feb 27 04:53:26 EST 2009
> 9) Or is my approach of multiple processes otherwise flawed?
In Linux the communication between processes is really fast, cheap, easy
You can e.g. use pipes/queues (e.g. named pipes in the file system or
system 5 message queues).
In many cases you don't need threads to wait for data from such a queue
as you can use appropriate system library calls like "select()" or (the
new, more advanced way) (e)poll() (which despite of it's name does not
do any actively spinning polling) to schedule your reactions on several
events thrown by other processes. In Linux "everything is a file", so
handling such queues (and IP-sockets, hardware ports etc) is done using
the same paradigm as with handling normal files.
More information about the uClinux-dev