summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-18 21:42:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-18 21:42:58 +0000
commit9863dbfdd45ff4a8fcd06b8a146f7870e4159db9 (patch)
tree4bdaaf1cd1e31a9a510e9627094c13f8bc19b88c /cpukit
parent+ Added object type field to object id. (diff)
downloadrtems-9863dbfdd45ff4a8fcd06b8a146f7870e4159db9.tar.bz2
+ Added object type field to object id.
+ Added name pointer to Object_Control. + Modified Object Open and Close to address name field. + Removed name as separate element from Thread and Proxy Control. + Added parameter "object class" to calls to Initialize Information
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libmisc/monitor/mon-object.c10
-rw-r--r--cpukit/rtems/src/dpmem.c1
-rw-r--r--cpukit/rtems/src/msg.c3
-rw-r--r--cpukit/rtems/src/part.c1
-rw-r--r--cpukit/rtems/src/ratemon.c1
-rw-r--r--cpukit/rtems/src/region.c1
-rw-r--r--cpukit/rtems/src/rtemstimer.c1
-rw-r--r--cpukit/rtems/src/sem.c1
-rw-r--r--cpukit/rtems/src/tasks.c1
-rw-r--r--cpukit/sapi/src/extension.c1
-rw-r--r--cpukit/score/src/object.c29
-rw-r--r--cpukit/score/src/thread.c1
12 files changed, 36 insertions, 15 deletions
diff --git a/cpukit/libmisc/monitor/mon-object.c b/cpukit/libmisc/monitor/mon-object.c
index 5add90763e..2747b23551 100644
--- a/cpukit/libmisc/monitor/mon-object.c
+++ b/cpukit/libmisc/monitor/mon-object.c
@@ -120,12 +120,16 @@ rtems_monitor_id_fixup(
{
#if 0
/* XXX Uncomment this when types are added to id's */
- if (rtems_get_type(id) != RTEMS_OBJECT_INVALID)
- type = rtems_get_type(id);
+ if (rtems_get_class(id) != OBJECTS_NO_CLASS)
+ type = rtems_get_class(id);
id = _Objects_Build_id(type, default_node, rtems_get_index(id));
#else
- id = _Objects_Build_id(default_node, rtems_get_index(id));
+#warning "TONY... FIX ME!!!!!"
+#if defined(hppa1_1)
+#error "TONY... I SAID TO FIX ME!!!!! <HAHAHAHAHA>"
+#endif
+ id = _Objects_Build_id(0, default_node, rtems_get_index(id));
#endif
}
return id;
diff --git a/cpukit/rtems/src/dpmem.c b/cpukit/rtems/src/dpmem.c
index 0aacecec5b..b594ecd00e 100644
--- a/cpukit/rtems/src/dpmem.c
+++ b/cpukit/rtems/src/dpmem.c
@@ -37,6 +37,7 @@ void _Dual_ported_memory_Manager_initialization(
{
_Objects_Initialize_information(
&_Dual_ported_memory_Information,
+ OBJECTS_RTEMS_PORTS,
FALSE,
maximum_ports,
sizeof( Dual_ported_memory_Control )
diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c
index 9b1c6acef5..dc136271fe 100644
--- a/cpukit/rtems/src/msg.c
+++ b/cpukit/rtems/src/msg.c
@@ -45,6 +45,7 @@ void _Message_queue_Manager_initialization(
{
_Objects_Initialize_information(
&_Message_queue_Information,
+ OBJECTS_RTEMS_MESSAGE_QUEUES,
TRUE,
maximum_message_queues,
sizeof( Message_queue_Control )
@@ -285,7 +286,7 @@ rtems_status_code rtems_message_queue_delete(
MESSAGE_QUEUE_MP_ANNOUNCE_DELETE,
the_message_queue->Object.id,
0, /* Not used */
- MPCI_DEFAULT_TIMEOUT
+ 0
);
}
diff --git a/cpukit/rtems/src/part.c b/cpukit/rtems/src/part.c
index 1fa2e0e716..7cf0fe691c 100644
--- a/cpukit/rtems/src/part.c
+++ b/cpukit/rtems/src/part.c
@@ -39,6 +39,7 @@ void _Partition_Manager_initialization(
{
_Objects_Initialize_information(
&_Partition_Information,
+ OBJECTS_RTEMS_PARTITIONS,
TRUE,
maximum_partitions,
sizeof( Partition_Control )
diff --git a/cpukit/rtems/src/ratemon.c b/cpukit/rtems/src/ratemon.c
index 3c0733a3ab..86f1534d98 100644
--- a/cpukit/rtems/src/ratemon.c
+++ b/cpukit/rtems/src/ratemon.c
@@ -41,6 +41,7 @@ void _Rate_monotonic_Manager_initialization(
{
_Objects_Initialize_information(
&_Rate_monotonic_Information,
+ OBJECTS_RTEMS_PERIODS,
FALSE,
maximum_periods,
sizeof( Rate_monotonic_Control )
diff --git a/cpukit/rtems/src/region.c b/cpukit/rtems/src/region.c
index c62214eaf6..40bd7ffa26 100644
--- a/cpukit/rtems/src/region.c
+++ b/cpukit/rtems/src/region.c
@@ -39,6 +39,7 @@ void _Region_Manager_initialization(
{
_Objects_Initialize_information(
&_Region_Information,
+ OBJECTS_RTEMS_REGIONS,
FALSE,
maximum_regions,
sizeof( Region_Control )
diff --git a/cpukit/rtems/src/rtemstimer.c b/cpukit/rtems/src/rtemstimer.c
index abab4cc7b4..ec55c3eaf9 100644
--- a/cpukit/rtems/src/rtemstimer.c
+++ b/cpukit/rtems/src/rtemstimer.c
@@ -38,6 +38,7 @@ void _Timer_Manager_initialization(
{
_Objects_Initialize_information(
&_Timer_Information,
+ OBJECTS_RTEMS_TIMERS,
FALSE,
maximum_timers,
sizeof( Timer_Control )
diff --git a/cpukit/rtems/src/sem.c b/cpukit/rtems/src/sem.c
index 19410c62f1..340a4fa947 100644
--- a/cpukit/rtems/src/sem.c
+++ b/cpukit/rtems/src/sem.c
@@ -56,6 +56,7 @@ void _Semaphore_Manager_initialization(
{
_Objects_Initialize_information(
&_Semaphore_Information,
+ OBJECTS_RTEMS_SEMAPHORES,
TRUE,
maximum_semaphores,
sizeof( Semaphore_Control )
diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c
index edba524d94..e900df0ab8 100644
--- a/cpukit/rtems/src/tasks.c
+++ b/cpukit/rtems/src/tasks.c
@@ -143,7 +143,6 @@ rtems_status_code rtems_task_create(
return( RTEMS_TOO_MANY );
}
- the_thread->name = name;
the_thread->attribute_set = the_attribute_set;
the_thread->current_state = STATES_DORMANT;
the_thread->current_modes = initial_modes;
diff --git a/cpukit/sapi/src/extension.c b/cpukit/sapi/src/extension.c
index 10c974ef8e..4cae903a34 100644
--- a/cpukit/sapi/src/extension.c
+++ b/cpukit/sapi/src/extension.c
@@ -36,6 +36,7 @@ void _Extension_Manager_initialization(
{
_Objects_Initialize_information(
&_Extension_Information,
+ OBJECTS_RTEMS_EXTENSIONS,
FALSE,
maximum_extensions,
sizeof( Extension_Control )
diff --git a/cpukit/score/src/object.c b/cpukit/score/src/object.c
index 29450d4171..bd8edaef58 100644
--- a/cpukit/score/src/object.c
+++ b/cpukit/score/src/object.c
@@ -51,7 +51,8 @@ void _Objects_Handler_initialization(
* This routine initializes all object information related data structures.
*
* Input parameters:
- * information - object class
+ * 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
@@ -61,25 +62,27 @@ void _Objects_Handler_initialization(
void _Objects_Initialize_information(
Objects_Information *information,
- boolean supports_global,
- unsigned32 maximum,
- unsigned32 size
+ Objects_Classes the_class,
+ boolean supports_global,
+ unsigned32 maximum,
+ unsigned32 size
)
{
unsigned32 minimum_index;
unsigned32 index;
Objects_Control *the_object;
- information->maximum = maximum;
+ information->maximum = maximum;
+ information->the_class = the_class;
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
- _Objects_Build_id( _Objects_Local_node, minimum_index );
+ _Objects_Build_id( the_class, _Objects_Local_node, minimum_index );
information->maximum_id =
- _Objects_Build_id( _Objects_Local_node, maximum );
+ _Objects_Build_id( the_class, _Objects_Local_node, maximum );
information->local_table = _Workspace_Allocate_or_fatal_error(
(maximum + 1) * sizeof(Objects_Control *)
@@ -110,7 +113,8 @@ void _Objects_Initialize_information(
for ( index=1;
index <= maximum ;
index++ ) {
- the_object->id = _Objects_Build_id( _Objects_Local_node, index );
+ the_object->id =
+ _Objects_Build_id( the_class, _Objects_Local_node, index );
the_object = (Objects_Control *) the_object->Node.next;
}
@@ -172,7 +176,11 @@ rtems_status_code _Objects_Name_to_id(
index++
)
if ( name == names[ index ] ) {
- *id = _Objects_Build_id( _Objects_Local_node, index );
+ *id = _Objects_Build_id(
+ information->the_class,
+ _Objects_Local_node,
+ index
+ );
return( RTEMS_SUCCESSFUL );
}
}
@@ -213,6 +221,7 @@ Objects_Control *_Objects_Get(
unsigned32 index;
index = id - information->minimum_id;
+
if ( information->maximum >= index ) {
_Thread_Disable_dispatch();
if ( (the_object = information->local_table[index+1]) != NULL ) {
@@ -273,7 +282,7 @@ _Objects_Get_next(
do {
/* walked off end of list? */
- if (next_id > information->maximum_id)
+ if (rtems_get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
goto final;
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index 0cdb224bbc..5480651d9c 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -59,6 +59,7 @@ void _Thread_Handler_initialization(
_Objects_Initialize_information(
&_Thread_Information,
+ OBJECTS_RTEMS_TASKS,
TRUE,
maximum_tasks,
sizeof( Thread_Control )