MESSAGE IPC(2)

NAME
procreceive, procsend, procrecvclr, procrecvtim - GNO message passing IPC system

SYNOPSIS
#include <gno/gno.h>
int procsend (pid_t pid, unsigned long msg);
unsigned long procreceive (void);
unsigned long procrecvtim (short timeout);
unsigned long procrecvclr (void);

DESCRIPTION
These kernel traps comprise GNO's message passing IPC (interprocess communication) system. Messages are unsigned 32-bit data values. A process sends a message to another by using the procsend call. You must specify the process ID of the recipient and the message to pass.

The procreceive trap receives a message. If no message has been sent to the process, the process sleeps until a message arrives. A procreceive that is interrupted by a signal will abort and return -1, with errno set to EINTR.

procrecvclr is used to clear any pending message a process may have waiting.

procrecvtim is similar to procreceive, but takes a timeout argument, specified in 1/10ths of a second. If no message has been received in timeout seconds, procrecvtim fails and returns -1. The message buffer for a process is only one message deep; any attempt to procsend a message to a process that already has one queued will result in an error.

For an IPC system with a deeper queue, see the Ports IPC man page, ports(2).

SEE ALSO
ports(2).