1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Initializes message_queue Manager Related Data Structures |
---|
5 | * @ingroup POSIX_MQUEUE_P Message Queues Private Support Information |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2008. |
---|
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 |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #include <stdarg.h> |
---|
22 | |
---|
23 | #include <pthread.h> |
---|
24 | #include <errno.h> |
---|
25 | #include <fcntl.h> |
---|
26 | #include <mqueue.h> |
---|
27 | #include <limits.h> |
---|
28 | |
---|
29 | #include <rtems/system.h> |
---|
30 | #include <rtems/config.h> |
---|
31 | #include <rtems/score/watchdog.h> |
---|
32 | #include <rtems/seterr.h> |
---|
33 | #include <rtems/posix/mqueueimpl.h> |
---|
34 | #include <rtems/posix/time.h> |
---|
35 | |
---|
36 | /* |
---|
37 | * _POSIX_Message_queue_Manager_initialization |
---|
38 | * |
---|
39 | * This routine initializes all message_queue manager related data structures. |
---|
40 | * |
---|
41 | * Input parameters: NONE |
---|
42 | * |
---|
43 | * Output parameters: NONE |
---|
44 | */ |
---|
45 | |
---|
46 | void _POSIX_Message_queue_Manager_initialization(void) |
---|
47 | { |
---|
48 | _Objects_Initialize_information( |
---|
49 | &_POSIX_Message_queue_Information, /* object information table */ |
---|
50 | OBJECTS_POSIX_API, /* object API */ |
---|
51 | OBJECTS_POSIX_MESSAGE_QUEUES, /* object class */ |
---|
52 | Configuration_POSIX_API.maximum_message_queues, |
---|
53 | /* maximum objects of this class */ |
---|
54 | sizeof( POSIX_Message_queue_Control ), |
---|
55 | /* size of this object's control block */ |
---|
56 | true, /* true if names for this object are strings */ |
---|
57 | _POSIX_PATH_MAX /* maximum length of each object's name */ |
---|
58 | #if defined(RTEMS_MULTIPROCESSING) |
---|
59 | , |
---|
60 | false, /* true if this is a global object class */ |
---|
61 | NULL /* Proxy extraction support callout */ |
---|
62 | #endif |
---|
63 | ); |
---|
64 | _Objects_Initialize_information( |
---|
65 | &_POSIX_Message_queue_Information_fds, |
---|
66 | OBJECTS_POSIX_API, |
---|
67 | OBJECTS_POSIX_MESSAGE_QUEUE_FDS, |
---|
68 | Configuration_POSIX_API.maximum_message_queue_descriptors, |
---|
69 | sizeof( POSIX_Message_queue_Control_fd ), |
---|
70 | /* size of this object's control block */ |
---|
71 | true, /* true if names for this object are strings */ |
---|
72 | NAME_MAX /* maximum length of each object's name */ |
---|
73 | #if defined(RTEMS_MULTIPROCESSING) |
---|
74 | , |
---|
75 | false, /* true if this is a global object class */ |
---|
76 | NULL /* Proxy extraction support callout */ |
---|
77 | #endif |
---|
78 | ); |
---|
79 | } |
---|