Message passing

While the impact of threads on message passing may seem minimal, it resulted in a fundamental change to the way message passing was done (not to the fundamental concepts of message passing, like SEND/RECEIVE/REPLY, but to the implementation).

Under QNX 4, messages were targeted at process IDs. To send a message, you simply found the process ID of the target and did your Send(). For servers to receive a message under QNX 4 they just did a Receive(). This would block until a message arrived. The server would then reply with the Reply() function.

Under QNX Neutrino, message passing is identical (different function names, though). What's changed is the mechanism. The client now has to create a connection to a server before it can do the standard message-passing functions. And the server has to create a channel before it can do the standard message-passing functions.

Note: Note that the QNX 4 Creceive() function, which would do a non-blocking Receive(), is missing from QNX Neutrino. We generally discourage such "polling" functions, especially when you can start a thread, but if you really insist on performing a non-blocking MsgReceive(), you should take a look at the Clocks, Timers, and Getting a Kick Every So Often chapter (under "Kernel timeouts") for more information. For the short story version, here's the relevant code sample:
TimerTimeout (CLOCK_MONOTONIC, _NTO_TIMEOUT_RECEIVE, 
              NULL, NULL, NULL);
rcvid = MsgReceive (…