From 9fbe22ccd36c0414c67ca8fac1d5111884d3bbaa Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 1 Jul 2002 22:35:43 +0000 Subject: 2002-07-01 Joel Sherrill * Mega patch merge to change the format of the object IDs to loosen the dependency between the SCORE and the various APIs. There was considerable work to simplify the object name management and it appears that the name_table field is no longer needed. This patch also includes the addition of the internal mutex which is currently only used to protect some types of allocation and deallocation. This significantly can reduce context switch latency under certain circumstances. In particular, some heap/region operations were O(n) and had dispatching disabled. This should help enormously. With this merge, the patch is not as clean as it should be. In particular, the documentation has not been modified to reflect the new object ID layout, the IDs in the test screens are not updated, and _Objects_Get_information needs to be a real routine not inlined. As part of this patch a lot of MP code for thread/proxy blocking was made conditional and cleaned up. * src/cre_mbf.c, src/cre_sem.c, src/eventflags.c, src/fmempool.c, src/itronsem.c, src/mbox.c, src/msgbuffer.c, src/port.c, src/task.c, src/vmempool.c: Modified as part of above. --- cpukit/itron/ChangeLog | 21 +++++++++++++++++++++ cpukit/itron/src/cre_mbf.c | 4 +--- cpukit/itron/src/cre_sem.c | 4 +--- cpukit/itron/src/eventflags.c | 19 ++++++++++--------- cpukit/itron/src/fmempool.c | 17 +++++++++-------- cpukit/itron/src/itronsem.c | 15 ++++++++------- cpukit/itron/src/mbox.c | 21 +++++++++++---------- cpukit/itron/src/msgbuffer.c | 20 ++++++++++---------- cpukit/itron/src/port.c | 13 ++++++++----- cpukit/itron/src/task.c | 10 +++++++--- cpukit/itron/src/vmempool.c | 19 ++++++++++--------- 11 files changed, 96 insertions(+), 67 deletions(-) (limited to 'cpukit') diff --git a/cpukit/itron/ChangeLog b/cpukit/itron/ChangeLog index 59da9caf42..47653cd468 100644 --- a/cpukit/itron/ChangeLog +++ b/cpukit/itron/ChangeLog @@ -1,3 +1,24 @@ +2002-07-01 Joel Sherrill + + * Mega patch merge to change the format of the object IDs to + loosen the dependency between the SCORE and the various APIs. + There was considerable work to simplify the object name management + and it appears that the name_table field is no longer needed. + This patch also includes the addition of the internal mutex + which is currently only used to protect some types of allocation + and deallocation. This significantly can reduce context + switch latency under certain circumstances. In particular, + some heap/region operations were O(n) and had dispatching + disabled. This should help enormously. With this merge, + the patch is not as clean as it should be. In particular, + the documentation has not been modified to reflect the new object + ID layout, the IDs in the test screens are not updated, and + _Objects_Get_information needs to be a real routine not inlined. + As part of this patch a lot of MP code for thread/proxy blocking + was made conditional and cleaned up. + * src/cre_mbf.c, src/cre_sem.c, src/eventflags.c, src/fmempool.c, + src/itronsem.c, src/mbox.c, src/msgbuffer.c, src/port.c, src/task.c, + src/vmempool.c: Modified as part of above. 2002-07-01 Ralf Corsepius * configure.ac: Remove RTEMS_PROJECT_ROOT. diff --git a/cpukit/itron/src/cre_mbf.c b/cpukit/itron/src/cre_mbf.c index 4928501952..18b40c1520 100644 --- a/cpukit/itron/src/cre_mbf.c +++ b/cpukit/itron/src/cre_mbf.c @@ -67,11 +67,9 @@ ER cre_mbf( _CORE_message_queue_Initialize( &the_message_buffer->message_queue, - OBJECTS_ITRON_MESSAGE_BUFFERS, &the_msgq_attributes, pk_cmbf->bufsz / pk_cmbf->maxmsz, - pk_cmbf->maxmsz, - NULL /* Multiprocessing not supported */ + pk_cmbf->maxmsz ); _ITRON_Objects_Open( &_ITRON_Message_buffer_Information, diff --git a/cpukit/itron/src/cre_sem.c b/cpukit/itron/src/cre_sem.c index e32d8849c4..44671a3921 100644 --- a/cpukit/itron/src/cre_sem.c +++ b/cpukit/itron/src/cre_sem.c @@ -79,10 +79,8 @@ ER cre_sem( _CORE_semaphore_Initialize( &the_semaphore->semaphore, - OBJECTS_ITRON_SEMAPHORES, &the_semaphore_attributes, - pk_csem->isemcnt, - NULL /* Multiprocessing not supported */ + pk_csem->isemcnt ); _ITRON_Objects_Open( &_ITRON_Semaphore_Information, &the_semaphore->Object ); diff --git a/cpukit/itron/src/eventflags.c b/cpukit/itron/src/eventflags.c index 2bed194beb..86296fca5d 100644 --- a/cpukit/itron/src/eventflags.c +++ b/cpukit/itron/src/eventflags.c @@ -34,17 +34,18 @@ void _ITRON_Eventflags_Manager_initialization( { _Objects_Initialize_information( &_ITRON_Eventflags_Information, /* object information table */ + OBJECTS_ITRON_API, /* object API */ OBJECTS_ITRON_EVENTFLAGS, /* object class */ - FALSE, /* TRUE if this is a global */ - /* object class */ maximum_eventflags, /* maximum objects of this class */ - sizeof( ITRON_Eventflags_Control ), /* size of this object's */ - /* control block */ - FALSE, /* TRUE if names for this object */ - /* are strings */ - ITRON_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */ - /* name */ - FALSE /* TRUE if this class is threads */ + sizeof( ITRON_Eventflags_Control ), + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + ITRON_MAXIMUM_NAME_LENGTH /* 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/itron/src/fmempool.c b/cpukit/itron/src/fmempool.c index 2b5b2c769b..0058a2a090 100644 --- a/cpukit/itron/src/fmempool.c +++ b/cpukit/itron/src/fmempool.c @@ -35,17 +35,18 @@ void _ITRON_Fixed_memory_pool_Manager_initialization( { _Objects_Initialize_information( &_ITRON_Fixed_memory_pool_Information, /* object information table */ + OBJECTS_ITRON_API, /* object API */ OBJECTS_ITRON_FIXED_MEMORY_POOLS, /* object class */ - FALSE, /* TRUE if this is a global */ - /* object class */ maximum_fixed_memory_pools, /* maximum objects of this class */ sizeof( ITRON_Fixed_memory_pool_Control ), - /* size of this object's control block */ - FALSE, /* TRUE if names for this object */ - /* are strings */ - ITRON_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */ - /* name */ - FALSE /* TRUE if this class is threads */ + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + ITRON_MAXIMUM_NAME_LENGTH /* 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/itron/src/itronsem.c b/cpukit/itron/src/itronsem.c index 662f771c94..adb3637b83 100644 --- a/cpukit/itron/src/itronsem.c +++ b/cpukit/itron/src/itronsem.c @@ -38,16 +38,17 @@ void _ITRON_Semaphore_Manager_initialization( { _Objects_Initialize_information( &_ITRON_Semaphore_Information, /* object information table */ + OBJECTS_ITRON_API, /* object API */ OBJECTS_ITRON_SEMAPHORES, /* object class */ - FALSE, /* TRUE if this is a global */ - /* object class */ maximum_semaphores, /* maximum objects of this class */ sizeof( ITRON_Semaphore_Control ), /* size of this object's control block */ - FALSE, /* TRUE if names for this object */ - /* are strings */ - ITRON_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */ - /* name */ - FALSE /* TRUE if this class is threads */ + FALSE, /* TRUE if names for this object are strings */ + ITRON_MAXIMUM_NAME_LENGTH /* 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/itron/src/mbox.c b/cpukit/itron/src/mbox.c index cff86d71e7..7990a11976 100644 --- a/cpukit/itron/src/mbox.c +++ b/cpukit/itron/src/mbox.c @@ -36,17 +36,18 @@ void _ITRON_Mailbox_Manager_initialization( ) { _Objects_Initialize_information( - &_ITRON_Mailbox_Information, /* object information table */ - OBJECTS_ITRON_MAILBOXES, /* object class */ - FALSE, /* TRUE if this is a global */ - /* object class */ - maximum_mailboxes, /* maximum objects of this class */ + &_ITRON_Mailbox_Information, /* object information table */ + OBJECTS_ITRON_API, /* object API */ + OBJECTS_ITRON_MAILBOXES, /* object class */ + maximum_mailboxes, /* maximum objects of this class */ sizeof( ITRON_Mailbox_Control ), /* size of this object's control block */ - FALSE, /* TRUE if names for this object */ - /* are strings */ - ITRON_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */ - /* name */ - FALSE /* TRUE if this class is threads */ + FALSE, /* TRUE if names for this object are strings */ + ITRON_MAXIMUM_NAME_LENGTH /* 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/itron/src/msgbuffer.c b/cpukit/itron/src/msgbuffer.c index 48aec11504..df49314ec6 100644 --- a/cpukit/itron/src/msgbuffer.c +++ b/cpukit/itron/src/msgbuffer.c @@ -38,18 +38,18 @@ void _ITRON_Message_buffer_Manager_initialization( { _Objects_Initialize_information( &_ITRON_Message_buffer_Information, /* object information table */ + OBJECTS_ITRON_API, /* object API */ OBJECTS_ITRON_MESSAGE_BUFFERS, /* object class */ - FALSE, /* TRUE if this is a - global object class */ maximum_message_buffers, /* maximum objects of this class */ - sizeof( ITRON_Message_buffer_Control ), /* size of this - object's control - block */ - FALSE, /* TRUE if names for this - object are strings */ - ITRON_MAXIMUM_NAME_LENGTH, /* maximum length of each - object's name */ - FALSE /* TRUE if this class is threads */ + sizeof( ITRON_Message_buffer_Control ), + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + ITRON_MAXIMUM_NAME_LENGTH /* 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/itron/src/port.c b/cpukit/itron/src/port.c index 061008e0cf..4377368d22 100644 --- a/cpukit/itron/src/port.c +++ b/cpukit/itron/src/port.c @@ -34,14 +34,17 @@ void _ITRON_Port_Manager_initialization( { _Objects_Initialize_information( &_ITRON_Port_Information, /* object information table */ + OBJECTS_ITRON_API, /* object API */ OBJECTS_ITRON_PORTS, /* object class */ - FALSE, /* TRUE if this is a global object class */ maximum_ports, /* maximum objects of this class */ sizeof( ITRON_Port_Control ), /* size of this object's control block */ - FALSE, /* TRUE if names for this object */ - /* are strings */ - ITRON_MAXIMUM_NAME_LENGTH, /* maximum length of each object's name */ - FALSE /* TRUE if this class is threads */ + FALSE, /* TRUE if names for this object are strings */ + ITRON_MAXIMUM_NAME_LENGTH /* 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/itron/src/task.c b/cpukit/itron/src/task.c index 5c84e44ee3..75c845288e 100644 --- a/cpukit/itron/src/task.c +++ b/cpukit/itron/src/task.c @@ -198,13 +198,17 @@ void _ITRON_Task_Manager_initialization( _Objects_Initialize_information( &_ITRON_Task_Information, /* object information table */ + OBJECTS_ITRON_API, /* object API */ OBJECTS_ITRON_TASKS, /* object class */ - FALSE, /* TRUE if this is a global object class */ maximum_tasks, /* maximum objects of this class */ sizeof( Thread_Control ), /* size of this object's control block */ FALSE, /* TRUE if names for this object are strings */ - ITRON_MAXIMUM_NAME_LENGTH, /* maximum length of each object's name */ - TRUE /* TRUE if this class is threads */ + ITRON_MAXIMUM_NAME_LENGTH /* 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/itron/src/vmempool.c b/cpukit/itron/src/vmempool.c index 601e574725..b1bd8cae7f 100644 --- a/cpukit/itron/src/vmempool.c +++ b/cpukit/itron/src/vmempool.c @@ -35,17 +35,18 @@ void _ITRON_Variable_memory_pool_Manager_initialization( { _Objects_Initialize_information( &_ITRON_Variable_memory_pool_Information, /* object information table */ + OBJECTS_ITRON_API, /* object API */ OBJECTS_ITRON_VARIABLE_MEMORY_POOLS, /* object class */ - FALSE, /* TRUE if this is a global */ - /* object class */ - maximum_variable_memory_pools, /* maximum objects of this class */ + maximum_variable_memory_pools, /* maximum objects of this class */ sizeof( ITRON_Variable_memory_pool_Control ), - /* size of this object's control block */ - FALSE, /* TRUE if names for this object */ - /* are strings */ - ITRON_MAXIMUM_NAME_LENGTH, /* maximum length of each object's */ - /* name */ - FALSE /* TRUE if this class is threads */ + /* size of this object's control block */ + FALSE, /* TRUE if names for this object are strings */ + ITRON_MAXIMUM_NAME_LENGTH /* 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 ); /* -- cgit v1.2.3