diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-22 19:14:51 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-14 07:03:29 +0100 |
commit | 21275b58a5a69c3c838082ffc8a7a3641f32ea9a (patch) | |
tree | d331e17c15d71f107d0f14581a93ddf768b05813 /cpukit/rtems/src/partcreate.c | |
parent | rtems: Use object information to get config max (diff) | |
download | rtems-21275b58a5a69c3c838082ffc8a7a3641f32ea9a.tar.bz2 |
score: Static Objects_Information initialization
Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. 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.
Diffstat (limited to 'cpukit/rtems/src/partcreate.c')
-rw-r--r-- | cpukit/rtems/src/partcreate.c | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c index 1a7304efa3..99d0d59b37 100644 --- a/cpukit/rtems/src/partcreate.c +++ b/cpukit/rtems/src/partcreate.c @@ -23,26 +23,8 @@ #include <rtems/rtems/support.h> #include <rtems/score/threaddispatch.h> #include <rtems/score/sysstate.h> +#include <rtems/sysinit.h> -/* - * rtems_partition_create - * - * This directive creates a partiton of fixed sized buffers from the - * given contiguous memory area. - * - * Input parameters: - * name - user defined partition name - * starting_address - physical start address of partition - * length - physical length in bytes - * buffer_size - size of buffers in bytes - * attribute_set - partition attributes - * id - pointer to partition id - * - * Output parameters: - * id - partition id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ rtems_status_code rtems_partition_create( rtems_name name, @@ -133,3 +115,26 @@ rtems_status_code rtems_partition_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Partition_Manager_initialization(void) +{ + _Objects_Initialize_information( &_Partition_Information ); + + /* + * Register the MP Process Packet routine. + */ + +#if defined(RTEMS_MULTIPROCESSING) + _MPCI_Register_packet_processor( + MP_PACKET_PARTITION, + _Partition_MP_Process_packet + ); +#endif + +} + +RTEMS_SYSINIT_ITEM( + _Partition_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_PARTITION, + RTEMS_SYSINIT_ORDER_MIDDLE +); |