forked from Imagelibrary/rtems
@@ -34,15 +34,7 @@ extern "C" {
|
||||
* this class of objects.
|
||||
*/
|
||||
|
||||
POSIX_EXTERN Objects_Information _POSIX_Barrier_Information;
|
||||
|
||||
/**
|
||||
* @brief POSIX barrier manager initialization.
|
||||
*
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*/
|
||||
|
||||
void _POSIX_Barrier_Manager_initialization(void);
|
||||
extern Objects_Information _POSIX_Barrier_Information;
|
||||
|
||||
/**
|
||||
* @brief POSIX translate barrier return code.
|
||||
|
||||
@@ -21,12 +21,15 @@
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/sysinit.h>
|
||||
#include <rtems/posix/barrierimpl.h>
|
||||
|
||||
Objects_Information _POSIX_Barrier_Information;
|
||||
|
||||
/**
|
||||
* @brief _POSIX_Barrier_Manager_initialization
|
||||
*/
|
||||
void _POSIX_Barrier_Manager_initialization(void)
|
||||
static void _POSIX_Barrier_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_POSIX_Barrier_Information, /* object information table */
|
||||
@@ -44,3 +47,9 @@ void _POSIX_Barrier_Manager_initialization(void)
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
RTEMS_SYSINIT_ITEM(
|
||||
_POSIX_Barrier_Manager_initialization,
|
||||
RTEMS_SYSINIT_POSIX_BARRIER,
|
||||
RTEMS_SYSINIT_ORDER_MIDDLE
|
||||
);
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <mqueue.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/posix/barrierimpl.h>
|
||||
#include <rtems/posix/config.h>
|
||||
#include <rtems/posix/priorityimpl.h>
|
||||
#include <rtems/posix/psignalimpl.h>
|
||||
@@ -58,7 +57,6 @@ void _POSIX_API_Initialize(void)
|
||||
_POSIX_Key_Manager_initialization();
|
||||
|
||||
#ifdef RTEMS_POSIX_API
|
||||
_POSIX_Barrier_Manager_initialization();
|
||||
_POSIX_RWLock_Manager_initialization();
|
||||
_POSIX_Spinlock_Manager_initialization();
|
||||
#endif
|
||||
|
||||
@@ -49,6 +49,7 @@ extern "C" {
|
||||
#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE 000364
|
||||
#define RTEMS_SYSINIT_POSIX_SEMAPHORE 000365
|
||||
#define RTEMS_SYSINIT_POSIX_TIMER 000366
|
||||
#define RTEMS_SYSINIT_POSIX_BARRIER 000367
|
||||
#define RTEMS_SYSINIT_POSIX_CLEANUP 00036a
|
||||
#define RTEMS_SYSINIT_IDLE_THREADS 000380
|
||||
#define RTEMS_SYSINIT_BSP_LIBC 000400
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <rtems/extensionimpl.h>
|
||||
#ifdef RTEMS_POSIX_API
|
||||
#include <rtems/posix/barrierimpl.h>
|
||||
#include <rtems/posix/condimpl.h>
|
||||
#include <rtems/posix/mqueueimpl.h>
|
||||
#include <rtems/posix/muteximpl.h>
|
||||
@@ -101,6 +102,8 @@ typedef enum {
|
||||
POSIX_SEMAPHORE_POST,
|
||||
POSIX_TIMER_PRE,
|
||||
POSIX_TIMER_POST,
|
||||
POSIX_BARRIER_PRE,
|
||||
POSIX_BARRIER_POST,
|
||||
POSIX_CLEANUP_PRE,
|
||||
POSIX_CLEANUP_POST,
|
||||
#endif /* RTEMS_POSIX_API */
|
||||
@@ -437,6 +440,18 @@ LAST(RTEMS_SYSINIT_POSIX_TIMER)
|
||||
next_step(POSIX_TIMER_POST);
|
||||
}
|
||||
|
||||
FIRST(RTEMS_SYSINIT_POSIX_BARRIER)
|
||||
{
|
||||
assert(_POSIX_Barrier_Information.maximum == 0);
|
||||
next_step(POSIX_BARRIER_PRE);
|
||||
}
|
||||
|
||||
LAST(RTEMS_SYSINIT_POSIX_BARRIER)
|
||||
{
|
||||
assert(_POSIX_Barrier_Information.maximum != 0);
|
||||
next_step(POSIX_BARRIER_POST);
|
||||
}
|
||||
|
||||
static size_t user_extensions_pre_posix_cleanup;
|
||||
|
||||
FIRST(RTEMS_SYSINIT_POSIX_CLEANUP)
|
||||
@@ -566,6 +581,8 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
#ifdef RTEMS_POSIX_API
|
||||
|
||||
#define CONFIGURE_MAXIMUM_POSIX_BARRIERS 1
|
||||
|
||||
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 1
|
||||
|
||||
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
|
||||
|
||||
Reference in New Issue
Block a user