Colin Burgess(deleted)
|
Re: message passing concept
|
Colin Burgess(deleted)
05/22/2008 11:28 AM
post8386
|
Re: message passing concept
samir kumar wrote:
> I have a coceptual problem with message passing basics in QNX neutrino. I
am novice in RTOS and QNX .
>
> First:
> Does each thread own single channel for receiving? If not owned by each
thread, is it owned by the process ? If it owned by process, does it mean
every process will have a channel to receive message and any other process
can send message to any other process channel by attaching to it?
A channel is owned by the process. Any number of threads may call
MsgReceive on it. An incoming message will be assigned to the first thread
in the receive queue.
> Second:
> Since any number of message send/receive can be sent simultaneously, how
does receiving thread make sure that the sent message is intended for it ?
Normally threads share a channel (eg a pool of worker threads). However a
thread can create it's own
channel via the ChannelCreate() kernel call if it needs to. Of course the
sender must be aware of this
channel and create a connection to it.
--
cburgess@qnx.com
|
|
|