summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/src/objectinitializeinformation.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-07-01 22:30:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-07-01 22:30:12 +0000
commitef9505a92f6c9c962dc2649f49002311466e009e (patch)
tree5a869b6101918ff8b37f19ca2b36f0b835d69d58 /c/src/exec/score/src/objectinitializeinformation.c
parent2002-07-01 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-ef9505a92f6c9c962dc2649f49002311466e009e.tar.bz2
2002-07-01 Joel Sherrill <joel@OARcorp.com>
* 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. * include/Makefile.am, include/rtems/score/coremsg.h, include/rtems/score/coremutex.h, include/rtems/score/coresem.h, include/rtems/score/object.h, include/rtems/score/threadq.h, inline/rtems/score/object.inl, inline/rtems/score/thread.inl, macros/rtems/score/object.inl, src/Makefile.am, src/coremsg.c, src/coremutex.c, src/coresem.c, src/mpci.c, src/objectcomparenameraw.c, src/objectextendinformation.c, src/objectinitializeinformation.c, src/objectnametoid.c, src/thread.c, src/threadclose.c, src/threadget.c, src/threadq.c, src/threadqextractwithproxy.c: Modified as part of above. * include/rtems/score/apimutex.h, src/objectgetnoprotection.c: New files.
Diffstat (limited to 'c/src/exec/score/src/objectinitializeinformation.c')
-rw-r--r--c/src/exec/score/src/objectinitializeinformation.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/c/src/exec/score/src/objectinitializeinformation.c b/c/src/exec/score/src/objectinitializeinformation.c
index 9c21820888..02f09236f3 100644
--- a/c/src/exec/score/src/objectinitializeinformation.c
+++ b/c/src/exec/score/src/objectinitializeinformation.c
@@ -32,37 +32,42 @@
*
* Input parameters:
* information - object information table
- * the_class - object class
- * supports_global - TRUE if this is a global object class
* maximum - maximum objects of this class
* size - size of this object's control block
* is_string - TRUE if names for this object are strings
* maximum_name_length - maximum length of each object's name
- * is_thread - TRUE if this class is threads
+ * When multiprocessing is configured,
+ * supports_global - TRUE if this is a global object class
+ * extract_callout - pointer to threadq extract callout if MP
*
* Output parameters: NONE
*/
void _Objects_Initialize_information(
Objects_Information *information,
- Objects_Classes the_class,
- boolean supports_global,
+ Objects_APIs the_api,
+ unsigned32 the_class,
unsigned32 maximum,
unsigned32 size,
boolean is_string,
- unsigned32 maximum_name_length,
- boolean is_thread
+ unsigned32 maximum_name_length
+#if defined(RTEMS_MULTIPROCESSING)
+ ,
+ boolean supports_global,
+ Objects_Thread_queue_Extract_callout *extract
+#endif
)
{
static Objects_Control *null_local_table = NULL;
-
unsigned32 minimum_index;
- unsigned32 index;
unsigned32 name_length;
+#if defined(RTEMS_MULTIPROCESSING)
+ unsigned32 index;
+#endif
+ information->the_api = the_api;
information->the_class = the_class;
information->is_string = is_string;
- information->is_thread = is_thread;
information->local_table = 0;
information->name_table = 0;
@@ -75,7 +80,7 @@ void _Objects_Initialize_information(
* Set the entry in the object information table.
*/
- _Objects_Information_table[ the_class ] = information;
+ _Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Set the size of the object
@@ -110,7 +115,7 @@ void _Objects_Initialize_information(
else minimum_index = 1;
information->minimum_id =
- _Objects_Build_id( the_class, _Objects_Local_node, minimum_index );
+ _Objects_Build_id( the_api, the_class, _Objects_Local_node, minimum_index );
/*
* Calculate the maximum name length
@@ -153,6 +158,9 @@ void _Objects_Initialize_information(
* Take care of multiprocessing
*/
+#if defined(RTEMS_MULTIPROCESSING)
+ information->extract = extract;
+
if ( supports_global == TRUE && _System_state_Is_multiprocessing ) {
information->global_table =
@@ -165,4 +173,5 @@ void _Objects_Initialize_information(
}
else
information->global_table = NULL;
+#endif
}