qnx_proxy_attach

qnx_proxy_attach — creates a proxy message for a process.

Syntax

qnx_proxy_attach (pid, command, priority? )

		

Arguments

pid

The process ID of the task to receive the message.

command

The message code.

priority

The priority of the message (optional).

Returns

The process ID of the proxy, else -1.

Description

This function creates a message proxy that will deliver a standard message to a task whenever it is called. The proxy will accept any message from any other task, but will always send it's one message to the task identified with pid. The sending process will not block, and its message data will be discarded by the proxy.

Proxies are used to wake receive-blocked processes that are waiting for messages. They can also be used to send non-blocking messages between processes, but send_async is probably more useful for this. Proxy messages are queued, so if a proxy is triggered 95 times, its receiving task will get 95 identical messages. A proxy may have at most 65535 messages pending.

In case of error, the following errnos are possible:

    EAGAIN  No process entries free to make a proxy.

    EINVAL  The proxy message exceeds the maximum.

    ENOMEM  The process manager doesn't have enough memory to hold the message.

    ESRCH  The process ID (pid) does not exist.

Example

Examples of this function are beyond the scope of this documentation.

See Also

qnx_proxy_detach