From 5250ff39f042c09503b61eb81a2c705e9b06b917 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 23 Aug 1995 21:06:31 +0000 Subject: Moved _Thread_Information -> _RTEMS_tasks_Information. Added a table of object information control blocks. Modified _Thread_Get so it looks up a thread regardless of which thread management "entity" (manager, internal, etc) actually "owns" it. --- cpukit/score/include/rtems/score/object.h | 36 ++++++++++++++++++++++--------- cpukit/score/include/rtems/score/thread.h | 8 ------- 2 files changed, 26 insertions(+), 18 deletions(-) (limited to 'cpukit/score/include') diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h index c5226302d6..5c84868dc1 100644 --- a/cpukit/score/include/rtems/score/object.h +++ b/cpukit/score/include/rtems/score/object.h @@ -78,17 +78,21 @@ typedef unsigned32 Objects_Id; typedef enum { OBJECTS_NO_CLASS = 0, - OBJECTS_RTEMS_TASKS = 1, - OBJECTS_RTEMS_TIMERS = 2, - OBJECTS_RTEMS_SEMAPHORES = 3, - OBJECTS_RTEMS_MESSAGE_QUEUES = 4, - OBJECTS_RTEMS_PARTITIONS = 5, - OBJECTS_RTEMS_REGIONS = 6, - OBJECTS_RTEMS_PORTS = 7, - OBJECTS_RTEMS_PERIODS = 8, - OBJECTS_RTEMS_EXTENSIONS = 9 + OBJECTS_INTERNAL_THREADS = 1, + OBJECTS_RTEMS_TASKS = 2, + OBJECTS_RTEMS_TIMERS = 3, + OBJECTS_RTEMS_SEMAPHORES = 4, + OBJECTS_RTEMS_MESSAGE_QUEUES = 5, + OBJECTS_RTEMS_PARTITIONS = 6, + OBJECTS_RTEMS_REGIONS = 7, + OBJECTS_RTEMS_PORTS = 8, + OBJECTS_RTEMS_PERIODS = 9, + OBJECTS_RTEMS_EXTENSIONS = 10 } Objects_Classes; +#define OBJECTS_CLASSES_FIRST OBJECTS_NO_CLASS +#define OBJECTS_CLASSES_LAST OBJECTS_RTEMS_EXTENSIONS + /* * This enumerated type lists the locations which may be returned * by _Objects_Get. These codes indicate the success of locating @@ -128,6 +132,8 @@ typedef struct { Chain_Control Inactive; /* chain of inactive ctl blocks */ boolean is_string; /* TRUE if names are strings */ unsigned32 name_length; /* maximum length of names */ + boolean is_thread; /* TRUE if these are threads */ + /* irregardless of API */ } Objects_Information; /* @@ -137,6 +143,15 @@ typedef struct { EXTERN unsigned32 _Objects_Local_node; +/* + * The following is the list of information blocks for each object + * class. From the ID, we can go to one of these information blocks, + * and obtain a pointer to the appropriate object control block. + */ + +EXTERN Objects_Information + *_Objects_Information_table[OBJECTS_CLASSES_LAST + 1]; + /* * The following defines the constant which may be used * with _Objects_Get to manipulate the calling task. @@ -201,7 +216,8 @@ void _Objects_Initialize_information ( unsigned32 maximum, unsigned32 size, boolean is_string, - unsigned32 maximum_name_length + unsigned32 maximum_name_length, + boolean is_task ); /* diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index ddae52a363..9c5d0b040b 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -228,13 +228,6 @@ EXTERN Thread_Control *_Thread_Heir; EXTERN Thread_Control *_Thread_Allocated_fp; -/* - * The following defines the information control block used to - * manage this class of objects. - */ - -EXTERN Objects_Information _Thread_Information; - /* * The following context area contains the context of the "thread" * which invoked rtems_initialize_executive. This context is restored @@ -254,7 +247,6 @@ EXTERN Context_Control _Thread_BSP_context; */ void _Thread_Handler_initialization ( - unsigned32 maximum_tasks, unsigned32 ticks_per_timeslice, unsigned32 maximum_proxies ); -- cgit v1.2.3