NAME

mr_init - initializes ports for a thread

SYNOPSIS

#include <mrendez.h>

int mr_init( int nports );

DESCRIPTION

The mr_init() primitive is used to create and initialize ports for a thread that can be used for receiving messages with the mr_receive() call. nports defines the number of ports to create. A thread can have a maximum of 32 ports.

RETURN VALUES

If successful, mr_init() returns 0, otherwise it returns -1 and sets errno to indicate the error condition.

ERRORS

EINVAL
The nports specifies a value of 0 or greater than 31.
EEXIST
The nports have already been created.
ENOMEM
Not enough memory.

SEE ALSO

mr_receive()




< Copyright Rowebots Research Inc. and Multiprocessor Toolsmiths Inc. 1987-2008 >