RTEMS Logo

RTEMS 4.8.0 On-Line Library


Message Passing Manager mq_close - Close a Message Queue

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

16.4.2: mq_close - Close a Message Queue

CALLING SEQUENCE:

#include <mqueue.h>

int mq_close(
  mqd_t mqdes
);

STATUS CODES:

EINVAL - The descriptor does not represent a valid open message queue

DESCRIPTION:

The mq_close function removes the association between the message queue descriptor, mqdes, and its message queue. If mq_close() is successfully completed, the function returns a value of zero; otherwise, the function returns a value of -1 and sets errno to indicate the error.

NOTES:

If the process had successfully attached a notification request to the message queue via mq_notify, this attachment is removed, and the message queue is available for another process to attach for notification. mq_close has no effect on the contents of the message queue, all the messages that were in the queue remain in the queue.


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2007OAR Corporation