Proxies

Under QNX 4, the only way to send a non-blocking message was to create a proxy via qnx_proxy_attach(). This function returns a proxy ID (which is taken from the same number space as process IDs), which you can then Trigger() or return from an interrupt service routine (see below).

Under QNX Neutrino, you'd set up a struct sigevent to contain a “pulse,” and either use MsgDeliverEvent() to deliver the event or bind the event to a timer or ISR.

The usual trick under QNX 4 to detect proxy messages (via Receive() or Creceive()) was to compare the process ID returned by the receiving function against the proxy IDs that you're expecting. If you got a match, you knew it was a proxy. Alternatively, you could ignore the process ID returned by the receiving function and handle the message as if it were a “regular” message. Unfortunately, this has some porting complications.