forked from Imagelibrary/rtems
2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/include/rtems/posix/config.h, posix/src/mqueue.c, sapi/include/confdefs.h: Add configuration of posix message queue file descriptors as separate entity.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* posix/include/rtems/posix/config.h, posix/src/mqueue.c,
|
||||
sapi/include/confdefs.h: Add configuration of posix message queue
|
||||
file descriptors as separate entity.
|
||||
|
||||
2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* rtems/include/rtems/rtems/region.h: Use new name.
|
||||
|
||||
@@ -52,6 +52,7 @@ typedef struct {
|
||||
int maximum_timers;
|
||||
int maximum_queued_signals;
|
||||
int maximum_message_queues;
|
||||
int maximum_message_queue_descriptors;
|
||||
int maximum_semaphores;
|
||||
int maximum_barriers;
|
||||
int maximum_rwlocks;
|
||||
|
||||
@@ -73,7 +73,7 @@ void _POSIX_Message_queue_Manager_initialization(void)
|
||||
&_POSIX_Message_queue_Information_fds,
|
||||
OBJECTS_POSIX_API,
|
||||
OBJECTS_POSIX_MESSAGE_QUEUE_FDS,
|
||||
Configuration_POSIX_API.maximum_message_queues,
|
||||
Configuration_POSIX_API.maximum_message_queue_descriptors,
|
||||
sizeof( POSIX_Message_queue_Control_fd ),
|
||||
/* size of this object's control block */
|
||||
true, /* true if names for this object are strings */
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -1089,10 +1089,22 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
#ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
|
||||
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) 0
|
||||
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS 0
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_mqueue_fds) 0
|
||||
#else
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
|
||||
_Configure_POSIX_Named_Object_RAM( \
|
||||
_message_queues, sizeof(POSIX_Message_queue_Control) )
|
||||
|
||||
/* default to same number */
|
||||
#ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS
|
||||
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS \
|
||||
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
|
||||
#endif
|
||||
|
||||
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_mqueue_fds) \
|
||||
_Configure_POSIX_Named_Object_RAM( \
|
||||
_mqueue_fds, sizeof(POSIX_Message_queue_Control_fd) )
|
||||
#endif
|
||||
|
||||
#ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
|
||||
@@ -1842,6 +1854,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
CONFIGURE_MAXIMUM_POSIX_TIMERS,
|
||||
CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
|
||||
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
|
||||
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS,
|
||||
CONFIGURE_MAXIMUM_POSIX_SEMAPHORES,
|
||||
CONFIGURE_MAXIMUM_POSIX_BARRIERS,
|
||||
CONFIGURE_MAXIMUM_POSIX_RWLOCKS,
|
||||
@@ -2029,6 +2042,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
(CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
|
||||
(CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
|
||||
(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \
|
||||
(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS != 0) || \
|
||||
(CONFIGURE_MAXIMUM_POSIX_SEMAPHORES != 0) || \
|
||||
(CONFIGURE_MAXIMUM_POSIX_BARRIERS != 0) || \
|
||||
(CONFIGURE_MAXIMUM_POSIX_SPINLOCKS != 0) || \
|
||||
@@ -2102,5 +2116,15 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
|
||||
#error "Maximum priority configured higher than supported by target."
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If you have fewer POSIX Message Queue Descriptors than actual
|
||||
* POSIX Message Queues, then you will not be able to open all the
|
||||
* queues.
|
||||
*/
|
||||
#if (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS < \
|
||||
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES)
|
||||
#error "Fewer POSIX Message Queue descriptors than Queues!"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
Reference in New Issue
Block a user