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. --- cpukit/posix/inline/rtems/posix/mqueue.inl | 41 +++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'cpukit/posix/inline') diff --git a/cpukit/posix/inline/rtems/posix/mqueue.inl b/cpukit/posix/inline/rtems/posix/mqueue.inl index 4feaed5b59..d37431038b 100644 --- a/cpukit/posix/inline/rtems/posix/mqueue.inl +++ b/cpukit/posix/inline/rtems/posix/mqueue.inl @@ -21,12 +21,25 @@ * _POSIX_Message_queue_Allocate */ -RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) +RTEMS_INLINE_ROUTINE + POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) _Objects_Allocate( &_POSIX_Message_queue_Information ); } +/*PAGE + * + * _POSIX_Message_queue_Allocate_fd + */ + +RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * + _POSIX_Message_queue_Allocate_fd( void ) +{ + return (POSIX_Message_queue_Control_fd *) + _Objects_Allocate( &_POSIX_Message_queue_Information_fds ); +} + /*PAGE * * _POSIX_Message_queue_Free @@ -39,6 +52,18 @@ RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); } +/*PAGE + * + * _POSIX_Message_queue_Free_fd + */ + +RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( + POSIX_Message_queue_Control_fd *the_mq_fd +) +{ + _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); +} + /*PAGE * * _POSIX_Message_queue_Namespace_remove @@ -66,6 +91,20 @@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( _Objects_Get( &_POSIX_Message_queue_Information, id, location ); } +/*PAGE + * + * _POSIX_Message_queue_Get_fd + */ + +RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( + Objects_Id id, + Objects_Locations *location +) +{ + return (POSIX_Message_queue_Control_fd *) + _Objects_Get( &_POSIX_Message_queue_Information_fds, id, location ); +} + /*PAGE * * _POSIX_Message_queue_Is_null -- cgit v1.2.3