mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 06:54:41 +08:00
@@ -72,11 +72,6 @@ extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
|
||||
* Internal routines
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief POSIX signals manager initialization.
|
||||
*/
|
||||
void _POSIX_signals_Manager_Initialization(void);
|
||||
|
||||
#define _POSIX_signals_Acquire( lock_context ) \
|
||||
_Thread_queue_Acquire( &_POSIX_signals_Wait_queue, lock_context )
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <rtems/posix/pthreadimpl.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/seterr.h>
|
||||
#include <rtems/sysinit.h>
|
||||
|
||||
/*
|
||||
* Ensure we have the same number of vectors and default vector entries
|
||||
@@ -166,7 +167,7 @@ void _POSIX_signals_Action_handler(
|
||||
executing->Wait.return_code = hold_errno;
|
||||
}
|
||||
|
||||
void _POSIX_signals_Manager_Initialization(void)
|
||||
static void _POSIX_signals_Manager_Initialization(void)
|
||||
{
|
||||
uint32_t signo;
|
||||
uint32_t maximum_queued_signals;
|
||||
@@ -213,3 +214,9 @@ void _POSIX_signals_Manager_Initialization(void)
|
||||
_Chain_Initialize_empty( &_POSIX_signals_Inactive_siginfo );
|
||||
}
|
||||
}
|
||||
|
||||
RTEMS_SYSINIT_ITEM(
|
||||
_POSIX_signals_Manager_Initialization,
|
||||
RTEMS_SYSINIT_POSIX_SIGNALS,
|
||||
RTEMS_SYSINIT_ORDER_MIDDLE
|
||||
);
|
||||
|
||||
@@ -64,7 +64,6 @@ void _POSIX_API_Initialize(void)
|
||||
_POSIX_Key_Manager_initialization();
|
||||
|
||||
#ifdef RTEMS_POSIX_API
|
||||
_POSIX_signals_Manager_Initialization();
|
||||
_POSIX_Threads_Manager_initialization();
|
||||
_POSIX_Condition_variables_Manager_initialization();
|
||||
_POSIX_Mutex_Manager_initialization();
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#define RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY 000348
|
||||
#define RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC 000349
|
||||
#define RTEMS_SYSINIT_CLASSIC_BARRIER 00034a
|
||||
#define RTEMS_SYSINIT_POSIX_SIGNALS 000360
|
||||
#define RTEMS_SYSINIT_IDLE_THREADS 000380
|
||||
#define RTEMS_SYSINIT_BSP_LIBC 000400
|
||||
#define RTEMS_SYSINIT_BEFORE_DRIVERS 000500
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <rtems.h>
|
||||
@@ -25,6 +26,9 @@
|
||||
#include <rtems/test.h>
|
||||
|
||||
#include <rtems/extensionimpl.h>
|
||||
#ifdef RTEMS_POSIX_API
|
||||
#include <rtems/posix/psignalimpl.h>
|
||||
#endif /* RTEMS_POSIX_API */
|
||||
#include <rtems/rtems/barrierimpl.h>
|
||||
#include <rtems/rtems/dpmemimpl.h>
|
||||
#include <rtems/rtems/messageimpl.h>
|
||||
@@ -74,6 +78,10 @@ typedef enum {
|
||||
CLASSIC_RATE_MONOTONIC_POST,
|
||||
CLASSIC_BARRIER_PRE,
|
||||
CLASSIC_BARRIER_POST,
|
||||
#ifdef RTEMS_POSIX_API
|
||||
POSIX_SIGNALS_PRE,
|
||||
POSIX_SIGNALS_POST,
|
||||
#endif /* RTEMS_POSIX_API */
|
||||
IDLE_THREADS_PRE,
|
||||
IDLE_THREADS_POST,
|
||||
BSP_LIBC_PRE,
|
||||
@@ -309,6 +317,34 @@ LAST(RTEMS_SYSINIT_CLASSIC_BARRIER)
|
||||
next_step(CLASSIC_BARRIER_POST);
|
||||
}
|
||||
|
||||
#ifdef RTEMS_POSIX_API
|
||||
|
||||
FIRST(RTEMS_SYSINIT_POSIX_SIGNALS)
|
||||
{
|
||||
assert(
|
||||
memcmp(
|
||||
&_POSIX_signals_Vectors,
|
||||
_POSIX_signals_Default_vectors,
|
||||
sizeof(_POSIX_signals_Vectors)
|
||||
) != 0
|
||||
);
|
||||
next_step(POSIX_SIGNALS_PRE);
|
||||
}
|
||||
|
||||
LAST(RTEMS_SYSINIT_POSIX_SIGNALS)
|
||||
{
|
||||
assert(
|
||||
memcmp(
|
||||
&_POSIX_signals_Vectors,
|
||||
_POSIX_signals_Default_vectors,
|
||||
sizeof(_POSIX_signals_Vectors)
|
||||
) == 0
|
||||
);
|
||||
next_step(POSIX_SIGNALS_POST);
|
||||
}
|
||||
|
||||
#endif /* RTEMS_POSIX_API */
|
||||
|
||||
FIRST(RTEMS_SYSINIT_IDLE_THREADS)
|
||||
{
|
||||
assert(_System_state_Is_before_initialization(_System_state_Get()));
|
||||
|
||||
Reference in New Issue
Block a user