forked from Imagelibrary/rtems
2008-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/psignal.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/ptimer.h, posix/include/rtems/posix/rwlock.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/spinlock.h, posix/include/rtems/posix/timer.h, posix/src/cond.c, posix/src/key.c, posix/src/mqueue.c, posix/src/mutex.c, posix/src/pbarrier.c, posix/src/prwlock.c, posix/src/psignal.c, posix/src/pspin.c, posix/src/pthread.c, posix/src/pthreadinitthreads.c, posix/src/ptimer.c, posix/src/semaphore.c, sapi/src/posixapi.c: Convert POSIX manager initialization routines to directly pull parameters from configuration table.
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
2008-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* posix/include/rtems/posix/barrier.h,
|
||||
posix/include/rtems/posix/cond.h, posix/include/rtems/posix/key.h,
|
||||
posix/include/rtems/posix/mqueue.h,
|
||||
posix/include/rtems/posix/mutex.h,
|
||||
posix/include/rtems/posix/psignal.h,
|
||||
posix/include/rtems/posix/pthread.h,
|
||||
posix/include/rtems/posix/ptimer.h,
|
||||
posix/include/rtems/posix/rwlock.h,
|
||||
posix/include/rtems/posix/semaphore.h,
|
||||
posix/include/rtems/posix/spinlock.h,
|
||||
posix/include/rtems/posix/timer.h, posix/src/cond.c, posix/src/key.c,
|
||||
posix/src/mqueue.c, posix/src/mutex.c, posix/src/pbarrier.c,
|
||||
posix/src/prwlock.c, posix/src/psignal.c, posix/src/pspin.c,
|
||||
posix/src/pthread.c, posix/src/pthreadinitthreads.c,
|
||||
posix/src/ptimer.c, posix/src/semaphore.c, sapi/src/posixapi.c:
|
||||
Convert POSIX manager initialization routines to directly pull
|
||||
parameters from configuration table.
|
||||
|
||||
2008-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* rtems/Makefile.am, rtems/include/rtems/rtems/attr.h,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* + delete a barrier
|
||||
* + wait for a barrier
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2006.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -59,9 +59,7 @@ POSIX_EXTERN Objects_Information _POSIX_Barrier_Information;
|
||||
* concurrently be active in the system.
|
||||
*/
|
||||
|
||||
void _POSIX_Barrier_Manager_initialization(
|
||||
uint32_t maximum_barriers
|
||||
);
|
||||
void _POSIX_Barrier_Manager_initialization(void);
|
||||
|
||||
/**
|
||||
* @brief _POSIX_Barrier_Translate_core_barrier_return_code (
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* This include file contains all the private support information for
|
||||
* POSIX condition variables.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -65,9 +65,7 @@ extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes;
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*/
|
||||
|
||||
void _POSIX_Condition_variables_Manager_initialization(
|
||||
uint32_t maximum_condition_variables
|
||||
);
|
||||
void _POSIX_Condition_variables_Manager_initialization(void);
|
||||
|
||||
/*
|
||||
* _POSIX_Condition_variables_Allocate
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* This include file contains all the private support information for
|
||||
* POSIX key.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -53,9 +53,7 @@ POSIX_EXTERN Objects_Information _POSIX_Keys_Information;
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*/
|
||||
|
||||
void _POSIX_Key_Manager_initialization(
|
||||
uint32_t maximum_keys
|
||||
);
|
||||
void _POSIX_Key_Manager_initialization(void);
|
||||
|
||||
/*
|
||||
* _POSIX_Keys_Run_destructors
|
||||
|
||||
@@ -65,9 +65,7 @@ POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information_fds;
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*/
|
||||
|
||||
void _POSIX_Message_queue_Manager_initialization(
|
||||
uint32_t maximum_message_queues
|
||||
);
|
||||
void _POSIX_Message_queue_Manager_initialization(void);
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* This include file contains all the private support information for
|
||||
* POSIX mutex's.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -57,9 +57,7 @@ POSIX_EXTERN pthread_mutexattr_t _POSIX_Mutex_Default_attributes;
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*/
|
||||
|
||||
void _POSIX_Mutex_Manager_initialization(
|
||||
uint32_t maximum_mutexes
|
||||
);
|
||||
void _POSIX_Mutex_Manager_initialization(void);
|
||||
|
||||
/*
|
||||
* _POSIX_Mutex_Allocate
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -82,9 +82,7 @@ typedef struct {
|
||||
* Internal routines
|
||||
*/
|
||||
|
||||
void _POSIX_signals_Manager_Initialization(
|
||||
int maximum_queued_signals
|
||||
);
|
||||
void _POSIX_signals_Manager_Initialization(void);
|
||||
|
||||
void _POSIX_signals_Post_switch_extension(
|
||||
Thread_Control *the_thread
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* This include file contains all the private support information for
|
||||
* POSIX threads.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -39,14 +39,6 @@ extern "C" {
|
||||
|
||||
POSIX_EXTERN Objects_Information _POSIX_Threads_Information;
|
||||
|
||||
/*
|
||||
* These are used to manage the user initialization threads.
|
||||
*/
|
||||
|
||||
POSIX_EXTERN posix_initialization_threads_table
|
||||
*_POSIX_Threads_User_initialization_threads;
|
||||
POSIX_EXTERN uint32_t _POSIX_Threads_Number_of_initialization_threads;
|
||||
|
||||
extern const pthread_attr_t _POSIX_Threads_Default_attributes;
|
||||
|
||||
/**
|
||||
@@ -66,11 +58,7 @@ extern void (*_POSIX_Threads_Initialize_user_threads_p)(void);
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*/
|
||||
|
||||
void _POSIX_Threads_Manager_initialization(
|
||||
uint32_t maximum_pthreads,
|
||||
uint32_t number_of_initialization_threads,
|
||||
posix_initialization_threads_table *user_threads
|
||||
);
|
||||
void _POSIX_Threads_Manager_initialization(void);
|
||||
|
||||
/*
|
||||
* _POSIX_Threads_Allocate
|
||||
|
||||
@@ -34,7 +34,7 @@ extern "C" {
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*/
|
||||
|
||||
void _POSIX_Timer_Manager_initialization ( int max_timers );
|
||||
void _POSIX_Timer_Manager_initialization(void);
|
||||
|
||||
/*
|
||||
* 14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* + delete a RWLock
|
||||
* + wait for a RWLock
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2006.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -59,9 +59,7 @@ POSIX_EXTERN Objects_Information _POSIX_RWLock_Information;
|
||||
* concurrently be active in the system.
|
||||
*/
|
||||
|
||||
void _POSIX_RWLock_Manager_initialization(
|
||||
uint32_t maximum_rwlocks
|
||||
);
|
||||
void _POSIX_RWLock_Manager_initialization(void);
|
||||
|
||||
/**
|
||||
* @brief _POSIX_RWLock_Translate_core_RWLock_return_code (
|
||||
|
||||
@@ -57,9 +57,7 @@ POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information;
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*/
|
||||
|
||||
void _POSIX_Semaphore_Manager_initialization(
|
||||
uint32_t maximum_semaphorees
|
||||
);
|
||||
void _POSIX_Semaphore_Manager_initialization(void);
|
||||
|
||||
/*
|
||||
* _POSIX_Semaphore_Allocate
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* + delete a spinlock
|
||||
* + wait for a spinlock
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2006.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -59,9 +59,7 @@ POSIX_EXTERN Objects_Information _POSIX_Spinlock_Information;
|
||||
* concurrently be active in the system.
|
||||
*/
|
||||
|
||||
void _POSIX_Spinlock_Manager_initialization(
|
||||
uint32_t maximum_spinlocks
|
||||
);
|
||||
void _POSIX_Spinlock_Manager_initialization(void);
|
||||
|
||||
/**
|
||||
* @brief _POSIX_Spinlock_Translate_core_spinlock_return_code (
|
||||
|
||||
@@ -70,7 +70,7 @@ typedef struct {
|
||||
*
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*/
|
||||
void _POSIX_Timer_Manager_initialization ( int max_timers );
|
||||
void _POSIX_Timer_Manager_initialization(void);
|
||||
|
||||
/*
|
||||
* Timer TSR
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/object.h>
|
||||
#include <rtems/score/states.h>
|
||||
#include <rtems/score/watchdog.h>
|
||||
@@ -32,21 +33,19 @@
|
||||
* This routine initializes all condition variable manager related data
|
||||
* structures.
|
||||
*
|
||||
* Input parameters:
|
||||
* maximum_condition_variables - maximum configured condition_variables
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_Condition_variables_Manager_initialization(
|
||||
uint32_t maximum_condition_variables
|
||||
)
|
||||
void _POSIX_Condition_variables_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_POSIX_Condition_variables_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_CONDITION_VARIABLES, /* object class */
|
||||
maximum_condition_variables, /* maximum objects of this class */
|
||||
Configuration_POSIX_API.maximum_condition_variables,
|
||||
/* maximum objects of this class */
|
||||
sizeof( POSIX_Condition_variables_Control ),
|
||||
/* size of this object's control block */
|
||||
TRUE, /* TRUE if names for this object are strings */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/thread.h>
|
||||
#include <rtems/score/wkspace.h>
|
||||
#include <rtems/posix/key.h>
|
||||
@@ -30,17 +31,20 @@
|
||||
* DESCRIPTION:
|
||||
*
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_Key_Manager_initialization(
|
||||
uint32_t maximum_keys
|
||||
)
|
||||
void _POSIX_Key_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_POSIX_Keys_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_KEYS, /* object class */
|
||||
maximum_keys, /* maximum objects of this class */
|
||||
Configuration_POSIX_API.maximum_keys,
|
||||
/* maximum objects of this class */
|
||||
sizeof( POSIX_Keys_Control ),
|
||||
/* size of this object's control block */
|
||||
TRUE, /* TRUE if names for this object are strings */
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
|
||||
* time.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/watchdog.h>
|
||||
#include <rtems/seterr.h>
|
||||
#include <rtems/posix/mqueue.h>
|
||||
@@ -45,21 +46,19 @@
|
||||
*
|
||||
* This routine initializes all message_queue manager related data structures.
|
||||
*
|
||||
* Input parameters:
|
||||
* maximum_message_queues - maximum configured message_queues
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_Message_queue_Manager_initialization(
|
||||
uint32_t maximum_message_queues
|
||||
)
|
||||
void _POSIX_Message_queue_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_POSIX_Message_queue_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_MESSAGE_QUEUES, /* object class */
|
||||
maximum_message_queues, /* maximum objects of this class */
|
||||
Configuration_POSIX_API.maximum_message_queues,
|
||||
/* maximum objects of this class */
|
||||
sizeof( POSIX_Message_queue_Control ),
|
||||
/* size of this object's control block */
|
||||
TRUE, /* TRUE if names for this object are strings */
|
||||
@@ -74,7 +73,7 @@ void _POSIX_Message_queue_Manager_initialization(
|
||||
&_POSIX_Message_queue_Information_fds,
|
||||
OBJECTS_POSIX_API,
|
||||
OBJECTS_POSIX_MESSAGE_QUEUE_FDS,
|
||||
maximum_message_queues,
|
||||
Configuration_POSIX_API.maximum_message_queues,
|
||||
sizeof( POSIX_Message_queue_Control_fd ),
|
||||
/* size of this object's control block */
|
||||
TRUE, /* TRUE if names for this object are strings */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/coremutex.h>
|
||||
#include <rtems/score/watchdog.h>
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
@@ -39,9 +40,7 @@
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_Mutex_Manager_initialization(
|
||||
uint32_t maximum_mutexes
|
||||
)
|
||||
void _POSIX_Mutex_Manager_initialization(void)
|
||||
{
|
||||
pthread_mutexattr_t *default_attr = &_POSIX_Mutex_Default_attributes;
|
||||
|
||||
@@ -62,7 +61,8 @@ void _POSIX_Mutex_Manager_initialization(
|
||||
&_POSIX_Mutex_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_MUTEXES, /* object class */
|
||||
maximum_mutexes, /* maximum objects of this class */
|
||||
Configuration_POSIX_API.maximum_mutexes,
|
||||
/* maximum objects of this class */
|
||||
sizeof( POSIX_Mutex_Control ),
|
||||
/* size of this object's control block */
|
||||
TRUE, /* TRUE if names for this object are strings */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* + acquire a barrier
|
||||
* + release a barrier
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2006.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -30,29 +30,24 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/posix/barrier.h>
|
||||
|
||||
/**
|
||||
* @brief _POSIX_Barrier_Manager_initialization
|
||||
*
|
||||
* Input parameters:
|
||||
* maximum_barriers - maximum configured barriers
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_Barrier_Manager_initialization(
|
||||
uint32_t maximum_barriers
|
||||
)
|
||||
void _POSIX_Barrier_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_POSIX_Barrier_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_BARRIERS, /* object class */
|
||||
maximum_barriers, /* maximum objects of this class */
|
||||
Configuration_POSIX_API.maximum_barriers,
|
||||
/* maximum objects of this class */
|
||||
sizeof( POSIX_Barrier_Control ),/* size of this object's control block */
|
||||
TRUE, /* TRUE if the name is a string */
|
||||
_POSIX_PATH_MAX /* maximum length of each object's name */
|
||||
_POSIX_PATH_MAX /* maximum length of each object's name */
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
,
|
||||
FALSE, /* TRUE if this is a global object class */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* RWLock Manager -- Initialization
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2006.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -18,29 +18,24 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/posix/rwlock.h>
|
||||
|
||||
/**
|
||||
* @brief _POSIX_RWLock_Manager_initialization
|
||||
*
|
||||
* Input parameters:
|
||||
* maximum_rwlocks - maximum configured rwlocks
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_RWLock_Manager_initialization(
|
||||
uint32_t maximum_rwlocks
|
||||
)
|
||||
void _POSIX_RWLock_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_POSIX_RWLock_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_SPINLOCKS, /* object class */
|
||||
maximum_rwlocks, /* maximum objects of this class */
|
||||
Configuration_POSIX_API.maximum_rwlocks,
|
||||
/* maximum objects of this class */
|
||||
sizeof( POSIX_RWLock_Control ), /* size of this object's control block */
|
||||
TRUE, /* TRUE if the name is a string */
|
||||
_POSIX_PATH_MAX /* maximum length of each object's name */
|
||||
_POSIX_PATH_MAX /* maximum length of each object's name */
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
,
|
||||
FALSE, /* TRUE if this is a global object class */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <stdlib.h> /* exit */
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/isr.h>
|
||||
#include <rtems/score/thread.h>
|
||||
#include <rtems/score/tqdata.h>
|
||||
@@ -159,11 +160,12 @@ void _POSIX_signals_Post_switch_extension(
|
||||
* _POSIX_signals_Manager_Initialization
|
||||
*/
|
||||
|
||||
void _POSIX_signals_Manager_Initialization(
|
||||
int maximum_queued_signals
|
||||
)
|
||||
void _POSIX_signals_Manager_Initialization(void)
|
||||
{
|
||||
uint32_t signo;
|
||||
uint32_t maximum_queued_signals;
|
||||
|
||||
maximum_queued_signals = Configuration_POSIX_API.maximum_queued_signals;
|
||||
|
||||
/*
|
||||
* Ensure we have the same number of vectors and default vector entries
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* + acquire a spinlock
|
||||
* + release a spinlock
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2006.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -30,33 +30,28 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/posix/spinlock.h>
|
||||
|
||||
/**
|
||||
* @brief _POSIX_Spinlock_Manager_initialization
|
||||
*
|
||||
* Input parameters:
|
||||
* maximum_spinlocks - maximum configured spinlocks
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_Spinlock_Manager_initialization(
|
||||
uint32_t maximum_spinlocks
|
||||
)
|
||||
void _POSIX_Spinlock_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_POSIX_Spinlock_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_SPINLOCKS, /* object class */
|
||||
maximum_spinlocks, /* maximum objects of this class */
|
||||
Configuration_POSIX_API.maximum_spinlocks,
|
||||
/* maximum objects of this class */
|
||||
sizeof( POSIX_Spinlock_Control ),/* size of this object's control block */
|
||||
TRUE, /* TRUE if the name is a string */
|
||||
_POSIX_PATH_MAX /* maximum length of each object's name */
|
||||
TRUE, /* TRUE if the name is a string */
|
||||
_POSIX_PATH_MAX /* maximum length of each object's name */
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
,
|
||||
FALSE, /* TRUE if this is a global object class */
|
||||
NULL /* Proxy extraction support callout */
|
||||
FALSE, /* TRUE if this is a global object class */
|
||||
NULL /* Proxy extraction support callout */
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/apiext.h>
|
||||
#include <rtems/score/stack.h>
|
||||
#include <rtems/score/thread.h>
|
||||
@@ -309,23 +310,13 @@ User_extensions_Control _POSIX_Threads_User_extensions = {
|
||||
*
|
||||
* This routine initializes all threads manager related data structures.
|
||||
*
|
||||
* Input parameters:
|
||||
* maximum_pthreads - maximum configured pthreads
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_Threads_Manager_initialization(
|
||||
uint32_t maximum_pthreads,
|
||||
uint32_t number_of_initialization_threads,
|
||||
posix_initialization_threads_table *user_threads
|
||||
|
||||
)
|
||||
void _POSIX_Threads_Manager_initialization(void)
|
||||
{
|
||||
_POSIX_Threads_Number_of_initialization_threads =
|
||||
number_of_initialization_threads;
|
||||
_POSIX_Threads_User_initialization_threads = user_threads;
|
||||
|
||||
/*
|
||||
* There may not be any POSIX initialization threads configured.
|
||||
*/
|
||||
@@ -339,11 +330,12 @@ void _POSIX_Threads_Manager_initialization(
|
||||
&_POSIX_Threads_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_THREADS, /* object class */
|
||||
maximum_pthreads, /* maximum objects of this class */
|
||||
Configuration_POSIX_API.maximum_threads,
|
||||
/* maximum objects of this class */
|
||||
sizeof( Thread_Control ),
|
||||
/* size of this object's control block */
|
||||
TRUE, /* TRUE if names for this object are strings */
|
||||
_POSIX_PATH_MAX /* maximum length of each object's name */
|
||||
_POSIX_PATH_MAX /* maximum length of each object's name */
|
||||
#if defined(RTEMS_MULTIPROCESSING)
|
||||
,
|
||||
FALSE, /* TRUE if this is a global object class */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/apiext.h>
|
||||
#include <rtems/score/stack.h>
|
||||
#include <rtems/score/thread.h>
|
||||
@@ -44,7 +45,7 @@
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_Threads_Initialize_user_threads_body( void )
|
||||
void _POSIX_Threads_Initialize_user_threads_body(void)
|
||||
{
|
||||
int status;
|
||||
uint32_t index;
|
||||
@@ -53,8 +54,8 @@ void _POSIX_Threads_Initialize_user_threads_body( void )
|
||||
pthread_t thread_id;
|
||||
pthread_attr_t attr;
|
||||
|
||||
user_threads = _POSIX_Threads_User_initialization_threads;
|
||||
maximum = _POSIX_Threads_Number_of_initialization_threads;
|
||||
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
|
||||
maximum = Configuration_POSIX_API.number_of_initialization_threads;
|
||||
|
||||
if ( !user_threads || maximum == 0 )
|
||||
return;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <limits.h> /* _POSIX_PATH_MAX */
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/isr.h>
|
||||
#include <rtems/score/thread.h>
|
||||
#include <rtems/score/tod.h>
|
||||
@@ -44,17 +45,20 @@
|
||||
/*
|
||||
* _POSIX_Timer_Manager_initialization
|
||||
*
|
||||
* Description: Initialize the internal structure in which the data of all
|
||||
* the timers are stored
|
||||
* Description:
|
||||
*
|
||||
* Initialize the internal structure in which the data of all
|
||||
* the timers are stored
|
||||
*/
|
||||
|
||||
void _POSIX_Timer_Manager_initialization ( int maximum_timers )
|
||||
void _POSIX_Timer_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_POSIX_Timer_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_TIMERS, /* object class */
|
||||
maximum_timers, /* maximum objects of this class */
|
||||
Configuration_POSIX_API.maximum_timers,
|
||||
/* maximum objects of this class */
|
||||
sizeof( POSIX_Timer_Control ),
|
||||
/* size of this object's control block */
|
||||
TRUE, /* TRUE if names for this object are strings */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/score/object.h>
|
||||
#include <rtems/posix/semaphore.h>
|
||||
#include <rtems/posix/time.h>
|
||||
@@ -33,21 +34,19 @@
|
||||
*
|
||||
* This routine initializes all semaphore manager related data structures.
|
||||
*
|
||||
* Input parameters:
|
||||
* maximum_semaphores - maximum configured semaphores
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void _POSIX_Semaphore_Manager_initialization(
|
||||
uint32_t maximum_semaphores
|
||||
)
|
||||
void _POSIX_Semaphore_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_POSIX_Semaphore_Information, /* object information table */
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_SEMAPHORES, /* object class */
|
||||
maximum_semaphores /* maximum objects of this class */,
|
||||
OBJECTS_POSIX_API, /* object API */
|
||||
OBJECTS_POSIX_SEMAPHORES, /* object class */
|
||||
Configuration_POSIX_API.maximum_semaphores,
|
||||
/* maximum objects of this class */
|
||||
sizeof( POSIX_Semaphore_Control ),
|
||||
/* size of this object's control block */
|
||||
TRUE, /* TRUE if names for this object are strings */
|
||||
|
||||
@@ -74,33 +74,17 @@ void _POSIX_API_Initialize(void)
|
||||
|
||||
_Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
|
||||
|
||||
_POSIX_signals_Manager_Initialization( api->maximum_queued_signals );
|
||||
|
||||
_POSIX_Threads_Manager_initialization(
|
||||
api->maximum_threads,
|
||||
api->number_of_initialization_threads,
|
||||
api->User_initialization_threads_table
|
||||
);
|
||||
|
||||
_POSIX_Condition_variables_Manager_initialization(
|
||||
api->maximum_condition_variables
|
||||
);
|
||||
|
||||
_POSIX_Key_Manager_initialization( api->maximum_keys );
|
||||
|
||||
_POSIX_Mutex_Manager_initialization( api->maximum_mutexes );
|
||||
|
||||
_POSIX_Message_queue_Manager_initialization( api->maximum_message_queues );
|
||||
|
||||
_POSIX_Semaphore_Manager_initialization( api->maximum_semaphores );
|
||||
|
||||
_POSIX_Timer_Manager_initialization( api->maximum_timers );
|
||||
|
||||
_POSIX_Barrier_Manager_initialization( api->maximum_barriers );
|
||||
|
||||
_POSIX_RWLock_Manager_initialization( api->maximum_rwlocks );
|
||||
|
||||
_POSIX_Spinlock_Manager_initialization(api->maximum_spinlocks);
|
||||
_POSIX_signals_Manager_Initialization();
|
||||
_POSIX_Threads_Manager_initialization();
|
||||
_POSIX_Condition_variables_Manager_initialization();
|
||||
_POSIX_Key_Manager_initialization();
|
||||
_POSIX_Mutex_Manager_initialization();
|
||||
_POSIX_Message_queue_Manager_initialization();
|
||||
_POSIX_Semaphore_Manager_initialization();
|
||||
_POSIX_Timer_Manager_initialization();
|
||||
_POSIX_Barrier_Manager_initialization();
|
||||
_POSIX_RWLock_Manager_initialization();
|
||||
_POSIX_Spinlock_Manager_initialization();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user