summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/include/rtems/rtems/tasks.h19
-rw-r--r--cpukit/rtems/inline/rtems/rtems/tasks.inl4
-rw-r--r--cpukit/rtems/macros/rtems/rtems/tasks.inl4
-rw-r--r--cpukit/rtems/src/dpmem.c3
-rw-r--r--cpukit/rtems/src/msg.c3
-rw-r--r--cpukit/rtems/src/part.c3
-rw-r--r--cpukit/rtems/src/ratemon.c3
-rw-r--r--cpukit/rtems/src/region.c3
-rw-r--r--cpukit/rtems/src/rtemstimer.c3
-rw-r--r--cpukit/rtems/src/sem.c3
-rw-r--r--cpukit/rtems/src/taskmp.c4
-rw-r--r--cpukit/rtems/src/tasks.c38
12 files changed, 72 insertions, 18 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index 88bf8e0e65..2f1021f8c9 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -62,6 +62,25 @@ extern "C" {
#define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
/*
+ * The following defines the information control block used to
+ * manage this class of objects.
+ */
+
+EXTERN Objects_Information _RTEMS_tasks_Information;
+
+/*
+ * _RTEMS_tasks_Manager_initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine initializes all Task Manager related data structures.
+ */
+
+void _RTEMS_tasks_Manager_initialization(
+ unsigned32 maximum_tasks
+);
+
+/*
* rtems_task_create
*
* DESCRIPTION:
diff --git a/cpukit/rtems/inline/rtems/rtems/tasks.inl b/cpukit/rtems/inline/rtems/rtems/tasks.inl
index 10d3e3c197..d392b8b370 100644
--- a/cpukit/rtems/inline/rtems/rtems/tasks.inl
+++ b/cpukit/rtems/inline/rtems/rtems/tasks.inl
@@ -30,7 +30,7 @@
STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
- return (Thread_Control *) _Objects_Allocate( &_Thread_Information );
+ return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
}
/*PAGE
@@ -43,7 +43,7 @@ STATIC INLINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
- _Objects_Free( &_Thread_Information, &the_task->Object );
+ _Objects_Free( &_RTEMS_tasks_Information, &the_task->Object );
}
/*PAGE
diff --git a/cpukit/rtems/macros/rtems/rtems/tasks.inl b/cpukit/rtems/macros/rtems/rtems/tasks.inl
index 8fec704ea4..778d4867ca 100644
--- a/cpukit/rtems/macros/rtems/rtems/tasks.inl
+++ b/cpukit/rtems/macros/rtems/rtems/tasks.inl
@@ -29,7 +29,7 @@
*/
#define _RTEMS_tasks_Allocate() \
- (Thread_Control *) _Objects_Allocate( &_Thread_Information )
+ (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information )
/*PAGE
*
@@ -38,7 +38,7 @@
*/
#define _RTEMS_tasks_Free( _the_task ) \
- _Objects_Free( &_Thread_Information, &(_the_task)->Object )
+ _Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object )
/*PAGE
*
diff --git a/cpukit/rtems/src/dpmem.c b/cpukit/rtems/src/dpmem.c
index ea2469f4c5..522c14866b 100644
--- a/cpukit/rtems/src/dpmem.c
+++ b/cpukit/rtems/src/dpmem.c
@@ -43,7 +43,8 @@ void _Dual_ported_memory_Manager_initialization(
maximum_ports,
sizeof( Dual_ported_memory_Control ),
FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH
+ RTEMS_MAXIMUM_NAME_LENGTH,
+ FALSE
);
}
diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c
index d7c456f90a..6dfd26a8f0 100644
--- a/cpukit/rtems/src/msg.c
+++ b/cpukit/rtems/src/msg.c
@@ -51,7 +51,8 @@ void _Message_queue_Manager_initialization(
maximum_message_queues,
sizeof( Message_queue_Control ),
FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH
+ RTEMS_MAXIMUM_NAME_LENGTH,
+ FALSE
);
}
diff --git a/cpukit/rtems/src/part.c b/cpukit/rtems/src/part.c
index b1e284c669..a7e4308a13 100644
--- a/cpukit/rtems/src/part.c
+++ b/cpukit/rtems/src/part.c
@@ -45,7 +45,8 @@ void _Partition_Manager_initialization(
maximum_partitions,
sizeof( Partition_Control ),
FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH
+ RTEMS_MAXIMUM_NAME_LENGTH,
+ FALSE
);
}
diff --git a/cpukit/rtems/src/ratemon.c b/cpukit/rtems/src/ratemon.c
index 6e84c56fb3..c98de762af 100644
--- a/cpukit/rtems/src/ratemon.c
+++ b/cpukit/rtems/src/ratemon.c
@@ -47,7 +47,8 @@ void _Rate_monotonic_Manager_initialization(
maximum_periods,
sizeof( Rate_monotonic_Control ),
FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH
+ RTEMS_MAXIMUM_NAME_LENGTH,
+ FALSE
);
}
diff --git a/cpukit/rtems/src/region.c b/cpukit/rtems/src/region.c
index 90916dcc3a..b54493eec7 100644
--- a/cpukit/rtems/src/region.c
+++ b/cpukit/rtems/src/region.c
@@ -45,7 +45,8 @@ void _Region_Manager_initialization(
maximum_regions,
sizeof( Region_Control ),
FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH
+ RTEMS_MAXIMUM_NAME_LENGTH,
+ FALSE
);
}
diff --git a/cpukit/rtems/src/rtemstimer.c b/cpukit/rtems/src/rtemstimer.c
index 2aad758269..68d9e4591b 100644
--- a/cpukit/rtems/src/rtemstimer.c
+++ b/cpukit/rtems/src/rtemstimer.c
@@ -44,7 +44,8 @@ void _Timer_Manager_initialization(
maximum_timers,
sizeof( Timer_Control ),
FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH
+ RTEMS_MAXIMUM_NAME_LENGTH,
+ FALSE
);
}
diff --git a/cpukit/rtems/src/sem.c b/cpukit/rtems/src/sem.c
index 46dff9cdd7..d810c205ee 100644
--- a/cpukit/rtems/src/sem.c
+++ b/cpukit/rtems/src/sem.c
@@ -62,7 +62,8 @@ void _Semaphore_Manager_initialization(
maximum_semaphores,
sizeof( Semaphore_Control ),
FALSE,
- RTEMS_MAXIMUM_NAME_LENGTH
+ RTEMS_MAXIMUM_NAME_LENGTH,
+ FALSE
);
}
diff --git a/cpukit/rtems/src/taskmp.c b/cpukit/rtems/src/taskmp.c
index 17b08011ef..003c543c5a 100644
--- a/cpukit/rtems/src/taskmp.c
+++ b/cpukit/rtems/src/taskmp.c
@@ -194,7 +194,7 @@ void _RTEMS_tasks_MP_Process_packet (
case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
ignored = _Objects_MP_Open(
- &_Thread_Information,
+ &_RTEMS_tasks_Information,
the_packet->name,
the_packet->Prefix.id,
TRUE
@@ -205,7 +205,7 @@ void _RTEMS_tasks_MP_Process_packet (
case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
- _Objects_MP_Close( &_Thread_Information, the_packet->Prefix.id );
+ _Objects_MP_Close( &_RTEMS_tasks_Information, the_packet->Prefix.id );
_MPCI_Return_packet( the_packet_prefix );
break;
diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c
index 9cabbc50e9..5574a6633e 100644
--- a/cpukit/rtems/src/tasks.c
+++ b/cpukit/rtems/src/tasks.c
@@ -28,6 +28,34 @@
/*PAGE
*
+ * _RTEMS_tasks_Manager_initialization
+ *
+ * This routine initializes all Task Manager related data structures.
+ *
+ * Input parameters:
+ * maximum_tasks - number of tasks to initialize
+ *
+ * Output parameters: NONE
+ */
+
+void _RTEMS_tasks_Manager_initialization(
+ unsigned32 maximum_tasks
+)
+{
+ _Objects_Initialize_information(
+ &_RTEMS_tasks_Information,
+ OBJECTS_RTEMS_TASKS,
+ TRUE,
+ maximum_tasks,
+ sizeof( Thread_Control ),
+ FALSE,
+ RTEMS_MAXIMUM_NAME_LENGTH,
+ TRUE
+ );
+}
+
+/*PAGE
+ *
* rtems_task_create
*
* This directive creates a thread by allocating and initializing a
@@ -136,7 +164,7 @@ rtems_status_code rtems_task_create(
the_thread->Start.fp_context = the_thread->fp_context;
if ( _Attributes_Is_global( the_attribute_set ) &&
- !( _Objects_MP_Open( &_Thread_Information, name,
+ !( _Objects_MP_Open( &_RTEMS_tasks_Information, name,
the_thread->Object.id, FALSE ) ) ) {
_RTEMS_tasks_Free( the_thread );
(void) _Workspace_Free( memory );
@@ -157,7 +185,7 @@ rtems_status_code rtems_task_create(
_ASR_Initialize( &the_thread->Signal );
- _Objects_Open( &_Thread_Information, &the_thread->Object, &name );
+ _Objects_Open( &_RTEMS_tasks_Information, &the_thread->Object, &name );
*id = the_thread->Object.id;
@@ -199,7 +227,7 @@ rtems_status_code rtems_task_ident(
)
{
if ( name != OBJECTS_ID_OF_SELF )
- return( _Objects_Name_to_id( &_Thread_Information, &name, node, id ) );
+ return( _Objects_Name_to_id( &_RTEMS_tasks_Information, &name, node, id ) );
*id = _Thread_Executing->Object.id;
return( RTEMS_SUCCESSFUL );
@@ -368,7 +396,7 @@ rtems_status_code rtems_task_delete(
_Thread_Dispatch();
return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
case OBJECTS_LOCAL:
- _Objects_Close( &_Thread_Information, &the_thread->Object );
+ _Objects_Close( &_RTEMS_tasks_Information, &the_thread->Object );
_Thread_Set_state( the_thread, STATES_TRANSIENT );
@@ -388,7 +416,7 @@ rtems_status_code rtems_task_delete(
if ( _Attributes_Is_global( the_thread->attribute_set ) ) {
- _Objects_MP_Close( &_Thread_Information, the_thread->Object.id );
+ _Objects_MP_Close( &_RTEMS_tasks_Information, the_thread->Object.id );
_RTEMS_tasks_MP_Send_process_packet(
RTEMS_TASKS_MP_ANNOUNCE_DELETE,