qnx_receive

Gamma: Version 4.0
Prev |  | Next

# `qnx_receive`

`qnx_receive` -- performs a QNX 4 `Receive`.

## Syntax

    qnx_receive (taskid)

## Arguments

`taskid`

  Task id of the acceptable sender, or 0 to receive from any task.

## Returns

A list whose car is the process ID of the sending task and whose cdr is a character string containing the message which was sent, or -1 on error.

## Description

This function performs a QNX 4 Receive. Once a message has been received the sending task is blocked until the recipient issues a reply message using the `qnx_reply` function.

This function should only be used to receive a specific message from a specific task. There is no need to make your own event loop in Gamma since there is a choice of `next_event`, `next_event_nb`, and PtMainloop.

Possible errno values are:

- EFAULT invalid buffer size

- EINTR the function call was interrupted by a signal

- ESRCH the process ID does not exist

## Example

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

## See Also

`qnx_send`, `qnx_reply`, `send`, `send_async`, `next_event`, `next_event_nb`, `PtMainLoop`

Prev | Home | Next
`qnx_proxy_rem_detach` | Up | `qnx_reply`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.