[eb08acf] | 1 | /** |
---|
| 2 | * @file |
---|
[eb5a7e07] | 3 | * |
---|
[eb08acf] | 4 | * @brief Initializes message_queue Manager Related Data Structures |
---|
| 5 | * @ingroup POSIX_MQUEUE_P Message Queues Private Support Information |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | /* |
---|
[309e2f6] | 9 | * COPYRIGHT (c) 1989-2008. |
---|
[feaa007] | 10 | * On-Line Applications Research Corporation (OAR). |
---|
| 11 | * |
---|
| 12 | * The license and distribution terms for this file may be |
---|
| 13 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 14 | * http://www.rtems.org/license/LICENSE. |
---|
[5e9b32b] | 15 | */ |
---|
| 16 | |
---|
[f42b726] | 17 | #if HAVE_CONFIG_H |
---|
| 18 | #include "config.h" |
---|
| 19 | #endif |
---|
| 20 | |
---|
[5e9b32b] | 21 | #include <stdarg.h> |
---|
| 22 | |
---|
| 23 | #include <pthread.h> |
---|
| 24 | #include <errno.h> |
---|
| 25 | #include <fcntl.h> |
---|
| 26 | #include <mqueue.h> |
---|
[652524d9] | 27 | #include <limits.h> |
---|
[f4719d5a] | 28 | |
---|
[5e9b32b] | 29 | #include <rtems/system.h> |
---|
[309e2f6] | 30 | #include <rtems/config.h> |
---|
[3015ed64] | 31 | #include <rtems/sysinit.h> |
---|
[5e9b32b] | 32 | #include <rtems/score/watchdog.h> |
---|
[188c82b] | 33 | #include <rtems/seterr.h> |
---|
[972a5c5f] | 34 | #include <rtems/posix/mqueueimpl.h> |
---|
[5e9b32b] | 35 | |
---|
[3015ed64] | 36 | Objects_Information _POSIX_Message_queue_Information; |
---|
| 37 | |
---|
| 38 | Objects_Information _POSIX_Message_queue_Information_fds; |
---|
| 39 | |
---|
[64adc13] | 40 | /* |
---|
[5e9b32b] | 41 | * _POSIX_Message_queue_Manager_initialization |
---|
| 42 | * |
---|
| 43 | * This routine initializes all message_queue manager related data structures. |
---|
| 44 | * |
---|
[309e2f6] | 45 | * Input parameters: NONE |
---|
[5e9b32b] | 46 | * |
---|
| 47 | * Output parameters: NONE |
---|
| 48 | */ |
---|
[874297f3] | 49 | |
---|
[3015ed64] | 50 | static void _POSIX_Message_queue_Manager_initialization(void) |
---|
[5e9b32b] | 51 | { |
---|
| 52 | _Objects_Initialize_information( |
---|
[3c465878] | 53 | &_POSIX_Message_queue_Information, /* object information table */ |
---|
| 54 | OBJECTS_POSIX_API, /* object API */ |
---|
| 55 | OBJECTS_POSIX_MESSAGE_QUEUES, /* object class */ |
---|
[309e2f6] | 56 | Configuration_POSIX_API.maximum_message_queues, |
---|
| 57 | /* maximum objects of this class */ |
---|
[5e9b32b] | 58 | sizeof( POSIX_Message_queue_Control ), |
---|
[3c465878] | 59 | /* size of this object's control block */ |
---|
[b1dbfd7] | 60 | true, /* true if names for this object are strings */ |
---|
[f05eeb2] | 61 | _POSIX_PATH_MAX, /* maximum length of each object's name */ |
---|
[3c465878] | 62 | NULL /* Proxy extraction support callout */ |
---|
[5e9b32b] | 63 | ); |
---|
| 64 | } |
---|
[3015ed64] | 65 | |
---|
| 66 | RTEMS_SYSINIT_ITEM( |
---|
| 67 | _POSIX_Message_queue_Manager_initialization, |
---|
| 68 | RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE, |
---|
| 69 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 70 | ); |
---|