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/barriercreate.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/barriercreate.c')
-rw-r--r-- | cpukit/rtems/src/barriercreate.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/cpukit/rtems/src/barriercreate.c b/cpukit/rtems/src/barriercreate.c index 12a917fe60..5e0f883106 100644 --- a/cpukit/rtems/src/barriercreate.c +++ b/cpukit/rtems/src/barriercreate.c @@ -18,30 +18,12 @@ #include "config.h" #endif -#include <rtems/system.h> +#include <rtems/rtems/barrierimpl.h> #include <rtems/rtems/status.h> #include <rtems/rtems/support.h> #include <rtems/rtems/attrimpl.h> #include <rtems/score/isr.h> -#include <rtems/rtems/barrierimpl.h> - -/* - * rtems_barrier_create - * - * This directive creates a barrier. A barrier id is returned. - * - * Input parameters: - * name - user defined barrier name - * attribute_set - barrier attributes - * maximum_waiters - number of threads before automatic release - * priority_ceiling - barrier's ceiling priority - * id - pointer to barrier id - * - * Output parameters: - * id - barrier id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ +#include <rtems/sysinit.h> rtems_status_code rtems_barrier_create( rtems_name name, @@ -90,3 +72,14 @@ rtems_status_code rtems_barrier_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Barrier_Manager_initialization( void ) +{ + _Objects_Initialize_information( &_Barrier_Information ); +} + +RTEMS_SYSINIT_ITEM( + _Barrier_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_BARRIER, + RTEMS_SYSINIT_ORDER_MIDDLE +); |