From 21275b58a5a69c3c838082ffc8a7a3641f32ea9a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 22 Nov 2018 19:14:51 +0100 Subject: score: Static Objects_Information initialization Statically allocate the objects information together with the initial set of objects either via . Provide default object informations with zero objects via librtemscpu.a. This greatly simplifies the workspace size estimate. RTEMS applications which do not use the unlimited objects option are easier to debug since all objects reside now in statically allocated objects of the right types. Close #3621. --- cpukit/rtems/src/msgqcreate.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'cpukit/rtems/src/msgqcreate.c') diff --git a/cpukit/rtems/src/msgqcreate.c b/cpukit/rtems/src/msgqcreate.c index 8a16819f80..2925d244a7 100644 --- a/cpukit/rtems/src/msgqcreate.c +++ b/cpukit/rtems/src/msgqcreate.c @@ -18,18 +18,18 @@ #include "config.h" #endif -#include +#include +#include +#include +#include +#include #include #include #include #include #include #include -#include -#include -#include -#include -#include +#include rtems_status_code rtems_message_queue_create( rtems_name name, @@ -143,3 +143,26 @@ rtems_status_code rtems_message_queue_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Message_queue_Manager_initialization(void) +{ + _Objects_Initialize_information( &_Message_queue_Information); + + /* + * Register the MP Process Packet routine. + */ + +#if defined(RTEMS_MULTIPROCESSING) + _MPCI_Register_packet_processor( + MP_PACKET_MESSAGE_QUEUE, + _Message_queue_MP_Process_packet + ); +#endif + +} + +RTEMS_SYSINIT_ITEM( + _Message_queue_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE, + RTEMS_SYSINIT_ORDER_MIDDLE +); -- cgit v1.2.3