diff options
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r-- | cpukit/posix/src/cond.c | 21 | ||||
-rw-r--r-- | cpukit/posix/src/condinit.c | 6 | ||||
-rw-r--r-- | cpukit/posix/src/intr.c | 19 | ||||
-rw-r--r-- | cpukit/posix/src/key.c | 19 | ||||
-rw-r--r-- | cpukit/posix/src/keycreate.c | 25 | ||||
-rw-r--r-- | cpukit/posix/src/keydelete.c | 12 | ||||
-rw-r--r-- | cpukit/posix/src/killinfo.c | 15 | ||||
-rw-r--r-- | cpukit/posix/src/mqueue.c | 32 | ||||
-rw-r--r-- | cpukit/posix/src/mqueuecreatesupp.c | 8 | ||||
-rw-r--r-- | cpukit/posix/src/mutex.c | 19 | ||||
-rw-r--r-- | cpukit/posix/src/mutexinit.c | 4 | ||||
-rw-r--r-- | cpukit/posix/src/psignal.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/pthread.c | 26 | ||||
-rw-r--r-- | cpukit/posix/src/semaphore.c | 19 | ||||
-rw-r--r-- | cpukit/posix/src/semaphorecreatesupp.c | 8 |
15 files changed, 127 insertions, 108 deletions
diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c index df3780290f..f02a62275f 100644 --- a/cpukit/posix/src/cond.c +++ b/cpukit/posix/src/cond.c @@ -35,13 +35,18 @@ void _POSIX_Condition_variables_Manager_initialization( ) { _Objects_Initialize_information( - &_POSIX_Condition_variables_Information, - OBJECTS_POSIX_CONDITION_VARIABLES, - TRUE, - maximum_condition_variables, + &_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 */ sizeof( POSIX_Condition_variables_Control ), - FALSE, - 0, - FALSE - ); + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + 0 /* 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 */ +#endif + ); } diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c index c227299bfe..cab76e4ab1 100644 --- a/cpukit/posix/src/condinit.c +++ b/cpukit/posix/src/condinit.c @@ -70,14 +70,8 @@ int pthread_cond_init( /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( &the_cond->Wait_queue, - OBJECTS_POSIX_CONDITION_VARIABLES, THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_CONDITION_VARIABLE, -#if defined(RTEMS_MULTIPROCESSING) - _POSIX_Condition_variables_MP_Send_extract_proxy, -#else - NULL, -#endif ETIMEDOUT ); diff --git a/cpukit/posix/src/intr.c b/cpukit/posix/src/intr.c index 251d0cb2d4..7688142ddf 100644 --- a/cpukit/posix/src/intr.c +++ b/cpukit/posix/src/intr.c @@ -41,14 +41,19 @@ void _POSIX_Interrupt_Manager_initialization( POSIX_Interrupt_Control *the_vector; _Objects_Initialize_information( - &_POSIX_Interrupt_Handlers_Information, - OBJECTS_POSIX_INTERRUPTS, - FALSE, - maximum_interrupt_handlers, + &_POSIX_Interrupt_Handlers_Information, /* object information table */ + OBJECTS_POSIX_API, /* object API */ + OBJECTS_POSIX_INTERRUPTS, /* object class */ + maximum_interrupt_handlers, /* maximum objects of this class */ sizeof( POSIX_Interrupt_Handler_control ), - FALSE, - 0, - FALSE + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + 0 /* 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 */ +#endif ); for ( index=0 ; index < CPU_INTERRUPT_NUMBER_OF_VECTORS ; index++ ) { diff --git a/cpukit/posix/src/key.c b/cpukit/posix/src/key.c index fb92a9bb79..54f7213424 100644 --- a/cpukit/posix/src/key.c +++ b/cpukit/posix/src/key.c @@ -29,13 +29,18 @@ void _POSIX_Key_Manager_initialization( ) { _Objects_Initialize_information( - &_POSIX_Keys_Information, - OBJECTS_POSIX_KEYS, - FALSE, - maximum_keys, + &_POSIX_Keys_Information, /* object information table */ + OBJECTS_POSIX_API, /* object API */ + OBJECTS_POSIX_KEYS, /* object class */ + maximum_keys, /* maximum objects of this class */ sizeof( POSIX_Keys_Control ), - FALSE, - 0, - FALSE + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + 0 /* 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 */ +#endif ); } diff --git a/cpukit/posix/src/keycreate.c b/cpukit/posix/src/keycreate.c index bf3f7501cb..bcb881e756 100644 --- a/cpukit/posix/src/keycreate.c +++ b/cpukit/posix/src/keycreate.c @@ -28,7 +28,7 @@ int pthread_key_create( { POSIX_Keys_Control *the_key; void *table; - unsigned32 the_class; + unsigned32 the_api; unsigned32 bytes_to_allocate; @@ -49,29 +49,30 @@ int pthread_key_create( * for. [NOTE: Currently RTEMS Classic API tasks are not always enabled.] */ - for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS; - the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS; - the_class++ ) { + for ( the_api = 1; + the_api <= OBJECTS_APIS_LAST; + the_api++ ) { - if ( _Objects_Information_table[ the_class ] ) { + if ( _Objects_Information_table[ the_api ] && + _Objects_Information_table[ the_api ][ 1 ] ) { bytes_to_allocate = sizeof( void * ) * - (_Objects_Information_table[ the_class ]->maximum + 1); + (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { - for ( --the_class; - the_class >= OBJECTS_CLASSES_FIRST_THREAD_CLASS; - the_class-- ) - _Workspace_Free( the_key->Values[ the_class ] ); + for ( --the_api; + the_api >= 1; + the_api-- ) + _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } - the_key->Values[ the_class ] = table; + the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { - the_key->Values[ the_class ] = NULL; + the_key->Values[ the_api ] = NULL; } diff --git a/cpukit/posix/src/keydelete.c b/cpukit/posix/src/keydelete.c index 6c2fa4be36..1d595f2b8e 100644 --- a/cpukit/posix/src/keydelete.c +++ b/cpukit/posix/src/keydelete.c @@ -27,7 +27,7 @@ int pthread_key_delete( { register POSIX_Keys_Control *the_key; Objects_Locations location; - unsigned32 the_class; + unsigned32 the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { @@ -39,11 +39,11 @@ int pthread_key_delete( the_key->is_active = FALSE; - for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS; - the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS; - the_class++ ) - if ( the_key->Values[ the_class ] ) - _Workspace_Free( the_key->Values[ the_class ] ); + for ( the_api = 1; + the_api <= OBJECTS_APIS_LAST; + the_api++ ) + if ( the_key->Values[ the_api ] ) + _Workspace_Free( the_key->Values[ the_api ] ); /* * NOTE: The destructor is not called and it is the responsibility diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c index ae6067ab16..0d72a6ee9a 100644 --- a/cpukit/posix/src/killinfo.c +++ b/cpukit/posix/src/killinfo.c @@ -44,7 +44,7 @@ int killinfo( { sigset_t mask; POSIX_API_Control *api; - unsigned32 the_class; + unsigned32 the_api; unsigned32 index; unsigned32 maximum; Objects_Information *the_info; @@ -170,14 +170,17 @@ int killinfo( interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; - for ( the_class = OBJECTS_CLASSES_FIRST_THREAD_CLASS; - the_class <= OBJECTS_CLASSES_LAST_THREAD_CLASS; - the_class++ ) { + for ( the_api = 2; + the_api <= OBJECTS_APIS_LAST; + the_api++ ) { - if ( the_class == OBJECTS_INTERNAL_THREADS ) + if ( the_api == OBJECTS_INTERNAL_THREADS ) continue; - the_info = _Objects_Information_table[ the_class ]; + if ( !_Objects_Information_table[ the_api ] ) /* API not installed */ + continue; + + the_info = _Objects_Information_table[ the_api ][ 1 ]; if ( !the_info ) /* manager not installed */ continue; diff --git a/cpukit/posix/src/mqueue.c b/cpukit/posix/src/mqueue.c index 5d3c39bd72..8a97d50505 100644 --- a/cpukit/posix/src/mqueue.c +++ b/cpukit/posix/src/mqueue.c @@ -49,23 +49,33 @@ void _POSIX_Message_queue_Manager_initialization( ) { _Objects_Initialize_information( - &_POSIX_Message_queue_Information, - OBJECTS_POSIX_MESSAGE_QUEUES, - TRUE, - maximum_message_queues, + &_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 */ sizeof( POSIX_Message_queue_Control ), - TRUE, - _POSIX_PATH_MAX, - FALSE + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + _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 */ +#endif ); _Objects_Initialize_information( &_POSIX_Message_queue_Information_fds, + OBJECTS_POSIX_API, OBJECTS_POSIX_MESSAGE_QUEUE_FDS, - FALSE, maximum_message_queues, sizeof( POSIX_Message_queue_Control_fd ), - FALSE, - 0, - FALSE + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + 0 /* 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 */ +#endif ); } diff --git a/cpukit/posix/src/mqueuecreatesupp.c b/cpukit/posix/src/mqueuecreatesupp.c index 35b3e1b826..e71e0c6092 100644 --- a/cpukit/posix/src/mqueuecreatesupp.c +++ b/cpukit/posix/src/mqueuecreatesupp.c @@ -111,15 +111,9 @@ int _POSIX_Message_queue_Create_support( if ( ! _CORE_message_queue_Initialize( &the_mq->Message_queue, - OBJECTS_POSIX_MESSAGE_QUEUES, the_mq_attr, attr.mq_maxmsg, - attr.mq_msgsize, -#if 0 && defined(RTEMS_MULTIPROCESSING) - _POSIX_Message_queue_MP_Send_extract_proxy -#else - NULL -#endif + attr.mq_msgsize ) ) { #if 0 && defined(RTEMS_MULTIPROCESSING) diff --git a/cpukit/posix/src/mutex.c b/cpukit/posix/src/mutex.c index d848c11559..89f9040814 100644 --- a/cpukit/posix/src/mutex.c +++ b/cpukit/posix/src/mutex.c @@ -37,13 +37,18 @@ void _POSIX_Mutex_Manager_initialization( ) { _Objects_Initialize_information( - &_POSIX_Mutex_Information, - OBJECTS_POSIX_MUTEXES, - TRUE, - maximum_mutexes, + &_POSIX_Mutex_Information, /* object information table */ + OBJECTS_POSIX_API, /* object API */ + OBJECTS_POSIX_MUTEXES, /* object class */ + maximum_mutexes, /* maximum objects of this class */ sizeof( POSIX_Mutex_Control ), - FALSE, - 0, - FALSE + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + 0 /* 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 */ +#endif ); } diff --git a/cpukit/posix/src/mutexinit.c b/cpukit/posix/src/mutexinit.c index 84a0c2b5b7..97882040f9 100644 --- a/cpukit/posix/src/mutexinit.c +++ b/cpukit/posix/src/mutexinit.c @@ -163,10 +163,8 @@ int pthread_mutex_init( _CORE_mutex_Initialize( &the_mutex->Mutex, - OBJECTS_POSIX_MUTEXES, the_mutex_attr, - CORE_MUTEX_UNLOCKED, - NULL /* proxy_extract_callout */ + CORE_MUTEX_UNLOCKED ); _Objects_Open( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c index 506ef00c6c..f93b6cc7c1 100644 --- a/cpukit/posix/src/psignal.c +++ b/cpukit/posix/src/psignal.c @@ -225,10 +225,8 @@ void _POSIX_signals_Manager_Initialization( _Thread_queue_Initialize( &_POSIX_signals_Wait_queue, - OBJECTS_NO_CLASS, THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL, - NULL, EAGAIN ); diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index 9281b5fe11..e1bade3baf 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -167,20 +167,17 @@ boolean _POSIX_Threads_Create_extension( /* XXX use signal constants */ api->signals_pending = 0; - if ( _Objects_Get_class( created->Object.id ) == OBJECTS_POSIX_THREADS ) { + if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API && + _Objects_Get_class( created->Object.id ) == 1 ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = api->signals_blocked; } else api->signals_blocked = 0xffffffff; -/* XXX set signal parameters -- block all signals for non-posix threads */ - _Thread_queue_Initialize( &api->Join_List, - OBJECTS_NO_CLASS, /* only used for proxy operations */ THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, - NULL, /* no extract proxy handler */ 0 ); @@ -356,14 +353,19 @@ void _POSIX_Threads_Manager_initialization( #endif _Objects_Initialize_information( - &_POSIX_Threads_Information, - OBJECTS_POSIX_THREADS, - FALSE, /* does not support global */ - maximum_pthreads, + &_POSIX_Threads_Information, /* object information table */ + OBJECTS_POSIX_API, /* object API */ + OBJECTS_POSIX_THREADS, /* object class */ + maximum_pthreads, /* maximum objects of this class */ sizeof( Thread_Control ), - FALSE, - 0, /* length is arbitrary for now */ - TRUE /* this class is threads */ + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + 0 /* 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 */ +#endif ); /* diff --git a/cpukit/posix/src/semaphore.c b/cpukit/posix/src/semaphore.c index c473dfed4b..e3f6ec9c84 100644 --- a/cpukit/posix/src/semaphore.c +++ b/cpukit/posix/src/semaphore.c @@ -37,13 +37,18 @@ void _POSIX_Semaphore_Manager_initialization( ) { _Objects_Initialize_information( - &_POSIX_Semaphore_Information, - OBJECTS_POSIX_SEMAPHORES, - TRUE, - maximum_semaphores, + &_POSIX_Semaphore_Information, /* object information table */ + OBJECTS_POSIX_API, /* object API */ + OBJECTS_POSIX_SEMAPHORES, /* object class */ + maximum_semaphores /* maximum objects of this class */, sizeof( POSIX_Semaphore_Control ), - TRUE, - _POSIX_PATH_MAX, - FALSE + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + _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 */ +#endif ); } diff --git a/cpukit/posix/src/semaphorecreatesupp.c b/cpukit/posix/src/semaphorecreatesupp.c index e45d4d808a..86b1179660 100644 --- a/cpukit/posix/src/semaphorecreatesupp.c +++ b/cpukit/posix/src/semaphorecreatesupp.c @@ -100,13 +100,7 @@ int _POSIX_Semaphore_Create_support( the_sem_attr->maximum_count = 0xFFFFFFFF; - _CORE_semaphore_Initialize( - &the_semaphore->Semaphore, - OBJECTS_POSIX_SEMAPHORES, - the_sem_attr, - value, - NULL /* multiprocessing is not supported */ - ); + _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); /* * Make the semaphore available for use. |