From 53092d19211054d67787990714798c2e72c8a623 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 26 Apr 2002 23:39:01 +0000 Subject: 2001-04-26 Joel Sherrill * include/rtems/posix/mqueue.h, inline/rtems/posix/mqueue.inl, src/mqueue.c, src/mqueueclose.c, src/mqueuecreatesupp.c, src/mqueuegetattr.c, src/mqueuenotify.c, src/mqueueopen.c, src/mqueuerecvsupp.c, src/mqueuesendsupp.c, src/mqueuesetattr.c: Per PR81 reworked to add a message queue descriptor separate from the underlying message queue. This allows non-blocking to follow the "open" not the underlying queue. --- c/src/exec/posix/include/rtems/posix/mqueue.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'c/src/exec/posix/include') diff --git a/c/src/exec/posix/include/rtems/posix/mqueue.h b/c/src/exec/posix/include/rtems/posix/mqueue.h index 6b2cb9e464..076ea1d6c2 100644 --- a/c/src/exec/posix/include/rtems/posix/mqueue.h +++ b/c/src/exec/posix/include/rtems/posix/mqueue.h @@ -34,18 +34,25 @@ typedef struct { int process_shared; boolean named; boolean linked; - int oflag; unsigned32 open_count; CORE_message_queue_Control Message_queue; struct sigevent notification; } POSIX_Message_queue_Control; +typedef struct { + Objects_Control Object; + POSIX_Message_queue_Control *Queue; + int oflag; +} POSIX_Message_queue_Control_fd; + /* * The following defines the information control block used to manage - * this class of objects. + * this class of objects. The second item is used to manage the set + * of "file descriptors" associated with the message queues. */ POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information; +POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information_fds; /* * _POSIX_Message_queue_Manager_initialization @@ -72,7 +79,6 @@ void _POSIX_Message_queue_Manager_initialization( int _POSIX_Message_queue_Create_support( const char *name, int pshared, - unsigned int oflag, struct mq_attr *attr, POSIX_Message_queue_Control **message_queue ); @@ -182,7 +188,8 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null ( * * DESCRIPTION: * - * XXX + * This routine looks up the specified name for a message queue and returns the + * id of the message queue associated with it. */ int _POSIX_Message_queue_Name_to_id( -- cgit v1.2.3