Changeset 5250ff39 in rtems


Ignore:
Timestamp:
08/23/95 21:06:31 (29 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
7f6a24ab
Parents:
3235ad9
Message:

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.

Files:
73 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/rtems/headers/tasks.h

    r3235ad9 r5250ff39  
    6363
    6464/*
     65 *  The following defines the information control block used to
     66 *  manage this class of objects.
     67 */
     68
     69EXTERN Objects_Information _RTEMS_tasks_Information;
     70
     71/*
     72 *  _RTEMS_tasks_Manager_initialization
     73 *
     74 *  DESCRIPTION:
     75 *
     76 *  This routine initializes all Task Manager related data structures.
     77 */
     78 
     79void _RTEMS_tasks_Manager_initialization(
     80  unsigned32   maximum_tasks
     81);
     82
     83/*
    6584 *  rtems_task_create
    6685 *
  • c/src/exec/rtems/include/rtems/rtems/tasks.h

    r3235ad9 r5250ff39  
    6363
    6464/*
     65 *  The following defines the information control block used to
     66 *  manage this class of objects.
     67 */
     68
     69EXTERN Objects_Information _RTEMS_tasks_Information;
     70
     71/*
     72 *  _RTEMS_tasks_Manager_initialization
     73 *
     74 *  DESCRIPTION:
     75 *
     76 *  This routine initializes all Task Manager related data structures.
     77 */
     78 
     79void _RTEMS_tasks_Manager_initialization(
     80  unsigned32   maximum_tasks
     81);
     82
     83/*
    6584 *  rtems_task_create
    6685 *
  • c/src/exec/rtems/inline/rtems/rtems/tasks.inl

    r3235ad9 r5250ff39  
    3131STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
    3232{
    33   return (Thread_Control *) _Objects_Allocate( &_Thread_Information );
     33  return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
    3434}
    3535
     
    4444)
    4545{
    46   _Objects_Free( &_Thread_Information, &the_task->Object );
     46  _Objects_Free( &_RTEMS_tasks_Information, &the_task->Object );
    4747}
    4848
  • c/src/exec/rtems/inline/tasks.inl

    r3235ad9 r5250ff39  
    3131STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
    3232{
    33   return (Thread_Control *) _Objects_Allocate( &_Thread_Information );
     33  return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
    3434}
    3535
     
    4444)
    4545{
    46   _Objects_Free( &_Thread_Information, &the_task->Object );
     46  _Objects_Free( &_RTEMS_tasks_Information, &the_task->Object );
    4747}
    4848
  • c/src/exec/rtems/macros/rtems/rtems/tasks.inl

    r3235ad9 r5250ff39  
    3030
    3131#define _RTEMS_tasks_Allocate() \
    32   (Thread_Control *) _Objects_Allocate( &_Thread_Information )
     32  (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information )
    3333
    3434/*PAGE
     
    3939
    4040#define _RTEMS_tasks_Free( _the_task ) \
    41   _Objects_Free( &_Thread_Information, &(_the_task)->Object )
     41  _Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object )
    4242
    4343/*PAGE
  • c/src/exec/rtems/macros/tasks.inl

    r3235ad9 r5250ff39  
    3030
    3131#define _RTEMS_tasks_Allocate() \
    32   (Thread_Control *) _Objects_Allocate( &_Thread_Information )
     32  (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information )
    3333
    3434/*PAGE
     
    3939
    4040#define _RTEMS_tasks_Free( _the_task ) \
    41   _Objects_Free( &_Thread_Information, &(_the_task)->Object )
     41  _Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object )
    4242
    4343/*PAGE
  • c/src/exec/rtems/src/dpmem.c

    r3235ad9 r5250ff39  
    4444    sizeof( Dual_ported_memory_Control ),
    4545    FALSE,
    46     RTEMS_MAXIMUM_NAME_LENGTH
     46    RTEMS_MAXIMUM_NAME_LENGTH,
     47    FALSE
    4748  );
    4849}
  • c/src/exec/rtems/src/msg.c

    r3235ad9 r5250ff39  
    5252    sizeof( Message_queue_Control ),
    5353    FALSE,
    54     RTEMS_MAXIMUM_NAME_LENGTH
     54    RTEMS_MAXIMUM_NAME_LENGTH,
     55    FALSE
    5556  );
    5657}
  • c/src/exec/rtems/src/part.c

    r3235ad9 r5250ff39  
    4646    sizeof( Partition_Control ),
    4747    FALSE,
    48     RTEMS_MAXIMUM_NAME_LENGTH
     48    RTEMS_MAXIMUM_NAME_LENGTH,
     49    FALSE
    4950  );
    5051
  • c/src/exec/rtems/src/ratemon.c

    r3235ad9 r5250ff39  
    4848    sizeof( Rate_monotonic_Control ),
    4949    FALSE,
    50     RTEMS_MAXIMUM_NAME_LENGTH
     50    RTEMS_MAXIMUM_NAME_LENGTH,
     51    FALSE
    5152  );
    5253}
  • c/src/exec/rtems/src/region.c

    r3235ad9 r5250ff39  
    4646    sizeof( Region_Control ),
    4747    FALSE,
    48     RTEMS_MAXIMUM_NAME_LENGTH
     48    RTEMS_MAXIMUM_NAME_LENGTH,
     49    FALSE
    4950  );
    5051}
  • c/src/exec/rtems/src/rtemstimer.c

    r3235ad9 r5250ff39  
    4545    sizeof( Timer_Control ),
    4646    FALSE,
    47     RTEMS_MAXIMUM_NAME_LENGTH
     47    RTEMS_MAXIMUM_NAME_LENGTH,
     48    FALSE
    4849  );
    4950}
  • c/src/exec/rtems/src/sem.c

    r3235ad9 r5250ff39  
    6363    sizeof( Semaphore_Control ),
    6464    FALSE,
    65     RTEMS_MAXIMUM_NAME_LENGTH
     65    RTEMS_MAXIMUM_NAME_LENGTH,
     66    FALSE
    6667  );
    6768}
  • c/src/exec/rtems/src/taskmp.c

    r3235ad9 r5250ff39  
    195195
    196196      ignored = _Objects_MP_Open(
    197                   &_Thread_Information,
     197                  &_RTEMS_tasks_Information,
    198198                  the_packet->name,
    199199                  the_packet->Prefix.id,
     
    206206    case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
    207207
    208       _Objects_MP_Close( &_Thread_Information, the_packet->Prefix.id );
     208      _Objects_MP_Close( &_RTEMS_tasks_Information, the_packet->Prefix.id );
    209209
    210210      _MPCI_Return_packet( the_packet_prefix );
  • c/src/exec/rtems/src/tasks.c

    r3235ad9 r5250ff39  
    2929/*PAGE
    3030 *
     31 *  _RTEMS_tasks_Manager_initialization
     32 *
     33 *  This routine initializes all Task Manager related data structures.
     34 *
     35 *  Input parameters:
     36 *    maximum_tasks       - number of tasks to initialize
     37 *
     38 *  Output parameters:  NONE
     39 */
     40
     41void _RTEMS_tasks_Manager_initialization(
     42  unsigned32   maximum_tasks
     43)
     44{
     45  _Objects_Initialize_information(
     46    &_RTEMS_tasks_Information,
     47    OBJECTS_RTEMS_TASKS,
     48    TRUE,
     49    maximum_tasks,
     50    sizeof( Thread_Control ),
     51    FALSE,
     52    RTEMS_MAXIMUM_NAME_LENGTH,
     53    TRUE
     54  );
     55}
     56
     57/*PAGE
     58 *
    3159 *  rtems_task_create
    3260 *
     
    137165
    138166  if ( _Attributes_Is_global( the_attribute_set ) &&
    139        !( _Objects_MP_Open( &_Thread_Information, name,
     167       !( _Objects_MP_Open( &_RTEMS_tasks_Information, name,
    140168                            the_thread->Object.id, FALSE ) ) ) {
    141169    _RTEMS_tasks_Free( the_thread );
     
    158186  _ASR_Initialize( &the_thread->Signal );
    159187
    160   _Objects_Open( &_Thread_Information, &the_thread->Object, &name );
     188  _Objects_Open( &_RTEMS_tasks_Information, &the_thread->Object, &name );
    161189
    162190  *id = the_thread->Object.id;
     
    200228{
    201229  if ( name != OBJECTS_ID_OF_SELF )
    202     return( _Objects_Name_to_id( &_Thread_Information, &name, node, id ) );
     230    return( _Objects_Name_to_id( &_RTEMS_tasks_Information, &name, node, id ) );
    203231
    204232  *id = _Thread_Executing->Object.id;
     
    369397      return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
    370398    case OBJECTS_LOCAL:
    371       _Objects_Close( &_Thread_Information, &the_thread->Object );
     399      _Objects_Close( &_RTEMS_tasks_Information, &the_thread->Object );
    372400
    373401      _Thread_Set_state( the_thread, STATES_TRANSIENT );
     
    389417      if ( _Attributes_Is_global( the_thread->attribute_set ) ) {
    390418
    391         _Objects_MP_Close( &_Thread_Information, the_thread->Object.id );
     419        _Objects_MP_Close( &_RTEMS_tasks_Information, the_thread->Object.id );
    392420
    393421        _RTEMS_tasks_MP_Send_process_packet(
  • c/src/exec/rtems/src/timer.c

    r3235ad9 r5250ff39  
    4545    sizeof( Timer_Control ),
    4646    FALSE,
    47     RTEMS_MAXIMUM_NAME_LENGTH
     47    RTEMS_MAXIMUM_NAME_LENGTH,
     48    FALSE
    4849  );
    4950}
  • c/src/exec/sapi/src/exinit.c

    r3235ad9 r5250ff39  
    153153
    154154  _Thread_Handler_initialization(
    155     configuration_table->maximum_tasks,
    156155    configuration_table->ticks_per_timeslice,
    157156    multiprocessing_table->maximum_proxies
     
    165164
    166165  _Multiprocessing_Manager_initialization();
     166
     167  _RTEMS_tasks_Manager_initialization( configuration_table->maximum_tasks );
    167168
    168169  _Timer_Manager_initialization( configuration_table->maximum_timers );
  • c/src/exec/sapi/src/extension.c

    r3235ad9 r5250ff39  
    4343    sizeof( Extension_Control ),
    4444    FALSE,
    45     RTEMS_MAXIMUM_NAME_LENGTH
     45    RTEMS_MAXIMUM_NAME_LENGTH,
     46    FALSE
    4647  );
    4748}
  • c/src/exec/score/headers/object.h

    r3235ad9 r5250ff39  
    7979typedef enum {
    8080  OBJECTS_NO_CLASS             =  0,
    81   OBJECTS_RTEMS_TASKS          =  1,
    82   OBJECTS_RTEMS_TIMERS         =  2,
    83   OBJECTS_RTEMS_SEMAPHORES     =  3,
    84   OBJECTS_RTEMS_MESSAGE_QUEUES =  4,
    85   OBJECTS_RTEMS_PARTITIONS     =  5,
    86   OBJECTS_RTEMS_REGIONS        =  6,
    87   OBJECTS_RTEMS_PORTS          =  7,
    88   OBJECTS_RTEMS_PERIODS        =  8,
    89   OBJECTS_RTEMS_EXTENSIONS     =  9
     81  OBJECTS_INTERNAL_THREADS     =  1,
     82  OBJECTS_RTEMS_TASKS          =  2,
     83  OBJECTS_RTEMS_TIMERS         =  3,
     84  OBJECTS_RTEMS_SEMAPHORES     =  4,
     85  OBJECTS_RTEMS_MESSAGE_QUEUES =  5,
     86  OBJECTS_RTEMS_PARTITIONS     =  6,
     87  OBJECTS_RTEMS_REGIONS        =  7,
     88  OBJECTS_RTEMS_PORTS          =  8,
     89  OBJECTS_RTEMS_PERIODS        =  9,
     90  OBJECTS_RTEMS_EXTENSIONS     = 10
    9091} Objects_Classes;
     92
     93#define OBJECTS_CLASSES_FIRST  OBJECTS_NO_CLASS
     94#define OBJECTS_CLASSES_LAST   OBJECTS_RTEMS_EXTENSIONS
    9195
    9296/*
     
    129133  boolean           is_string;       /* TRUE if names are strings */
    130134  unsigned32        name_length;     /* maximum length of names */
     135  boolean           is_thread;       /* TRUE if these are threads */
     136                                     /*   irregardless of API */
    131137}   Objects_Information;
    132138
     
    137143
    138144EXTERN unsigned32  _Objects_Local_node;
     145
     146/*
     147 *  The following is the list of information blocks for each object
     148 *  class.  From the ID, we can go to one of these information blocks,
     149 *  and obtain a pointer to the appropriate object control block.
     150 */
     151
     152EXTERN Objects_Information
     153    *_Objects_Information_table[OBJECTS_CLASSES_LAST + 1];
    139154
    140155/*
     
    202217  unsigned32           size,
    203218  boolean              is_string,
    204   unsigned32           maximum_name_length
     219  unsigned32           maximum_name_length,
     220  boolean              is_task
    205221);
    206222
  • c/src/exec/score/headers/thread.h

    r3235ad9 r5250ff39  
    230230
    231231/*
    232  *  The following defines the information control block used to
    233  *  manage this class of objects.
    234  */
    235 
    236 EXTERN Objects_Information _Thread_Information;
    237 
    238 /*
    239232 *  The following context area contains the context of the "thread"
    240233 *  which invoked rtems_initialize_executive.  This context is restored
     
    255248
    256249void _Thread_Handler_initialization (
    257   unsigned32 maximum_tasks,
    258250  unsigned32 ticks_per_timeslice,
    259251  unsigned32 maximum_proxies
  • c/src/exec/score/include/rtems/score/object.h

    r3235ad9 r5250ff39  
    7979typedef enum {
    8080  OBJECTS_NO_CLASS             =  0,
    81   OBJECTS_RTEMS_TASKS          =  1,
    82   OBJECTS_RTEMS_TIMERS         =  2,
    83   OBJECTS_RTEMS_SEMAPHORES     =  3,
    84   OBJECTS_RTEMS_MESSAGE_QUEUES =  4,
    85   OBJECTS_RTEMS_PARTITIONS     =  5,
    86   OBJECTS_RTEMS_REGIONS        =  6,
    87   OBJECTS_RTEMS_PORTS          =  7,
    88   OBJECTS_RTEMS_PERIODS        =  8,
    89   OBJECTS_RTEMS_EXTENSIONS     =  9
     81  OBJECTS_INTERNAL_THREADS     =  1,
     82  OBJECTS_RTEMS_TASKS          =  2,
     83  OBJECTS_RTEMS_TIMERS         =  3,
     84  OBJECTS_RTEMS_SEMAPHORES     =  4,
     85  OBJECTS_RTEMS_MESSAGE_QUEUES =  5,
     86  OBJECTS_RTEMS_PARTITIONS     =  6,
     87  OBJECTS_RTEMS_REGIONS        =  7,
     88  OBJECTS_RTEMS_PORTS          =  8,
     89  OBJECTS_RTEMS_PERIODS        =  9,
     90  OBJECTS_RTEMS_EXTENSIONS     = 10
    9091} Objects_Classes;
     92
     93#define OBJECTS_CLASSES_FIRST  OBJECTS_NO_CLASS
     94#define OBJECTS_CLASSES_LAST   OBJECTS_RTEMS_EXTENSIONS
    9195
    9296/*
     
    129133  boolean           is_string;       /* TRUE if names are strings */
    130134  unsigned32        name_length;     /* maximum length of names */
     135  boolean           is_thread;       /* TRUE if these are threads */
     136                                     /*   irregardless of API */
    131137}   Objects_Information;
    132138
     
    137143
    138144EXTERN unsigned32  _Objects_Local_node;
     145
     146/*
     147 *  The following is the list of information blocks for each object
     148 *  class.  From the ID, we can go to one of these information blocks,
     149 *  and obtain a pointer to the appropriate object control block.
     150 */
     151
     152EXTERN Objects_Information
     153    *_Objects_Information_table[OBJECTS_CLASSES_LAST + 1];
    139154
    140155/*
     
    202217  unsigned32           size,
    203218  boolean              is_string,
    204   unsigned32           maximum_name_length
     219  unsigned32           maximum_name_length,
     220  boolean              is_task
    205221);
    206222
  • c/src/exec/score/include/rtems/score/thread.h

    r3235ad9 r5250ff39  
    230230
    231231/*
    232  *  The following defines the information control block used to
    233  *  manage this class of objects.
    234  */
    235 
    236 EXTERN Objects_Information _Thread_Information;
    237 
    238 /*
    239232 *  The following context area contains the context of the "thread"
    240233 *  which invoked rtems_initialize_executive.  This context is restored
     
    255248
    256249void _Thread_Handler_initialization (
    257   unsigned32 maximum_tasks,
    258250  unsigned32 ticks_per_timeslice,
    259251  unsigned32 maximum_proxies
  • c/src/exec/score/inline/rtems/score/thread.inl

    r3235ad9 r5250ff39  
    232232 *  _Thread_Get
    233233 *
     234 *  NOTE:  XXX... This routine may be able to be optimized.
    234235 */
    235236
     
    239240)
    240241{
     242  Objects_Classes      the_class;
     243  Objects_Information *information;
     244 
    241245  if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
    242      _Thread_Disable_dispatch();
    243      *location = OBJECTS_LOCAL;
    244      return( _Thread_Executing );
     246    _Thread_Disable_dispatch();
     247    *location = OBJECTS_LOCAL;
     248    return( _Thread_Executing );
    245249  }
    246 
    247   return (Thread_Control *)
    248           _Objects_Get( &_Thread_Information, id, location );
     250 
     251  the_class = rtems_get_class( id );
     252 
     253  if ( the_class > OBJECTS_CLASSES_LAST ) {
     254    *location = OBJECTS_ERROR;
     255    return (Thread_Control *) 0;
     256  }
     257 
     258  information = _Objects_Information_table[ the_class ];
     259 
     260  if ( !information || !information->is_thread ) {
     261    *location = OBJECTS_ERROR;
     262    return (Thread_Control *) 0;
     263  }
     264 
     265  return (Thread_Control *) _Objects_Get( information, id, location );
    249266}
    250267
  • c/src/exec/score/inline/thread.inl

    r3235ad9 r5250ff39  
    232232 *  _Thread_Get
    233233 *
     234 *  NOTE:  XXX... This routine may be able to be optimized.
    234235 */
    235236
     
    239240)
    240241{
     242  Objects_Classes      the_class;
     243  Objects_Information *information;
     244 
    241245  if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
    242      _Thread_Disable_dispatch();
    243      *location = OBJECTS_LOCAL;
    244      return( _Thread_Executing );
     246    _Thread_Disable_dispatch();
     247    *location = OBJECTS_LOCAL;
     248    return( _Thread_Executing );
    245249  }
    246 
    247   return (Thread_Control *)
    248           _Objects_Get( &_Thread_Information, id, location );
     250 
     251  the_class = rtems_get_class( id );
     252 
     253  if ( the_class > OBJECTS_CLASSES_LAST ) {
     254    *location = OBJECTS_ERROR;
     255    return (Thread_Control *) 0;
     256  }
     257 
     258  information = _Objects_Information_table[ the_class ];
     259 
     260  if ( !information || !information->is_thread ) {
     261    *location = OBJECTS_ERROR;
     262    return (Thread_Control *) 0;
     263  }
     264 
     265  return (Thread_Control *) _Objects_Get( information, id, location );
    249266}
    250267
  • c/src/exec/score/src/object.c

    r3235ad9 r5250ff39  
    6969  unsigned32           size,
    7070  boolean              is_string,
    71   unsigned32           maximum_name_length
     71  unsigned32           maximum_name_length,
     72  boolean              is_thread
    7273)
    7374{
     
    8182  information->the_class = the_class;
    8283  information->is_string = is_string;
     84  information->is_thread = is_thread;
     85
     86  /*
     87   *  Set the entry in the object information table.
     88   */
     89
     90  _Objects_Information_table[ the_class ] = information;
    8391
    8492  /*
     
    380388Objects_Control *_Objects_Get(
    381389  Objects_Information *information,
    382   Objects_Id                  id,
    383   Objects_Locations          *location
     390  Objects_Id           id,
     391  Objects_Locations   *location
    384392)
    385393{
  • c/src/exec/score/src/thread.c

    r3235ad9 r5250ff39  
    3636 *
    3737 *  Input parameters:
    38  *    maximum_tasks       - number of tasks to initialize
    3938 *    ticks_per_timeslice - clock ticks per quantum
     39 *    maximum_proxies     - number of proxies to initialize
    4040 *
    4141 *  Output parameters:  NONE
     
    4343
    4444void _Thread_Handler_initialization(
    45   unsigned32   maximum_tasks,
    4645  unsigned32   ticks_per_timeslice,
    4746  unsigned32   maximum_proxies
     
    5756  _Thread_Ticks_remaining_in_timeslice = ticks_per_timeslice;
    5857  _Thread_Ticks_per_timeslice          = ticks_per_timeslice;
    59 
    60   _Objects_Initialize_information(
    61     &_Thread_Information,
    62     OBJECTS_RTEMS_TASKS,
    63     TRUE,
    64     maximum_tasks,
    65     sizeof( Thread_Control ),
    66     FALSE,
    67     RTEMS_MAXIMUM_NAME_LENGTH
    68   );
    6958
    7059  _Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
     
    790779 *  NOTE:  If we are not using static inlines, this must be a real
    791780 *         subroutine call.
     781 *
     782 *  NOTE:  XXX... This routine may be able to be optimized.
    792783 */
    793784
     
    795786
    796787STATIC INLINE Thread_Control *_Thread_Get (
    797   Objects_Id         id,
    798   Objects_Locations *location
    799 )
    800 {
     788  Objects_Id           id,
     789  Objects_Locations   *location
     790)
     791{
     792  Objects_Classes      the_class;
     793  Objects_Information *information;
     794 
    801795  if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
    802      _Thread_Disable_dispatch();
    803      *location = OBJECTS_LOCAL;
    804      return( _Thread_Executing );
    805   }
    806 
    807   return (Thread_Control *) _Objects_Get( &_Thread_Information, id, location );
     796    _Thread_Disable_dispatch();
     797    *location = OBJECTS_LOCAL;
     798    return( _Thread_Executing );
     799  }
     800 
     801  the_class = rtems_get_class( id );
     802 
     803  if ( the_class > OBJECTS_CLASSES_LAST ) {
     804    *location = OBJECTS_ERROR;
     805    return (Thread_Control *) 0;
     806  }
     807 
     808  information = _Objects_Information_table[ the_class ];
     809 
     810  if ( !information || !information->is_thread ) {
     811    *location = OBJECTS_ERROR;
     812    return (Thread_Control *) 0;
     813  }
     814 
     815  return (Thread_Control *) _Objects_Get( information, id, location );
    808816}
    809817#endif
    810 
  • c/src/lib/libmisc/monitor/mon-object.c

    r3235ad9 r5250ff39  
    6161    },
    6262    { RTEMS_OBJECT_TASK,
    63       (void *) &_Thread_Information,
     63      (void *) &_RTEMS_tasks_Information,
    6464      sizeof(rtems_monitor_task_t),
    6565      (rtems_monitor_object_next_fn)        rtems_monitor_manager_next,
  • c/src/lib/libmisc/stackchk/check.c

    r3235ad9 r5250ff39  
    416416void Stack_check_Dump_usage( void )
    417417{
    418   unsigned32      i;
    419   Thread_Control *the_thread;
    420   unsigned32      hit_running = 0;
     418  unsigned32           i;
     419  unsigned32           class_index;
     420  Thread_Control      *the_thread;
     421  unsigned32           hit_running = 0;
     422  Objects_Information *information;
    421423
    422424  if (stack_check_initialized == 0)
     
    426428    "   ID          NAME         LOW        HIGH      AVAILABLE     USED\n"
    427429  );
    428   for ( i=1 ; i<_Thread_Information.maximum ; i++ ) {
    429     the_thread = (Thread_Control *)_Thread_Information.local_table[ i ];
    430     Stack_check_Dump_threads_usage( the_thread );
    431     if ( the_thread == _Thread_Executing )
    432       hit_running = 1;
     430
     431  for ( class_index = OBJECTS_CLASSES_FIRST ;
     432        class_index <= OBJECTS_CLASSES_LAST ;
     433        class_index++ ) {
     434    information = _Objects_Information_table[ class_index ];
     435    if ( information && information->is_thread ) {
     436      for ( i=1 ; i < information->maximum ; i++ ) {
     437        the_thread = (Thread_Control *)information->local_table[ i ];
     438        Stack_check_Dump_threads_usage( the_thread );
     439        if ( the_thread == _Thread_Executing )
     440          hit_running = 1;
     441      }
     442    }
    433443  }
    434444
  • c/src/libmisc/monitor/mon-object.c

    r3235ad9 r5250ff39  
    6161    },
    6262    { RTEMS_OBJECT_TASK,
    63       (void *) &_Thread_Information,
     63      (void *) &_RTEMS_tasks_Information,
    6464      sizeof(rtems_monitor_task_t),
    6565      (rtems_monitor_object_next_fn)        rtems_monitor_manager_next,
  • c/src/libmisc/stackchk/check.c

    r3235ad9 r5250ff39  
    416416void Stack_check_Dump_usage( void )
    417417{
    418   unsigned32      i;
    419   Thread_Control *the_thread;
    420   unsigned32      hit_running = 0;
     418  unsigned32           i;
     419  unsigned32           class_index;
     420  Thread_Control      *the_thread;
     421  unsigned32           hit_running = 0;
     422  Objects_Information *information;
    421423
    422424  if (stack_check_initialized == 0)
     
    426428    "   ID          NAME         LOW        HIGH      AVAILABLE     USED\n"
    427429  );
    428   for ( i=1 ; i<_Thread_Information.maximum ; i++ ) {
    429     the_thread = (Thread_Control *)_Thread_Information.local_table[ i ];
    430     Stack_check_Dump_threads_usage( the_thread );
    431     if ( the_thread == _Thread_Executing )
    432       hit_running = 1;
     430
     431  for ( class_index = OBJECTS_CLASSES_FIRST ;
     432        class_index <= OBJECTS_CLASSES_LAST ;
     433        class_index++ ) {
     434    information = _Objects_Information_table[ class_index ];
     435    if ( information && information->is_thread ) {
     436      for ( i=1 ; i < information->maximum ; i++ ) {
     437        the_thread = (Thread_Control *)information->local_table[ i ];
     438        Stack_check_Dump_threads_usage( the_thread );
     439        if ( the_thread == _Thread_Executing )
     440          hit_running = 1;
     441      }
     442    }
    433443  }
    434444
  • c/src/tests/sptests/sp02/sp02.scn

    r3235ad9 r5250ff39  
    66TA2 - rtems_task_wake_after - sleep 1 minute
    77TA3 - rtems_task_wake_after - sleep 5 seconds
    8 TA1 - rtems_task_ident - tid of TA2 (0x04010007)
    9 TA1 - rtems_task_ident - tid of TA3 (0x04010008)
     8TA1 - rtems_task_ident - tid of TA2 (0x08010007)
     9TA1 - rtems_task_ident - tid of TA3 (0x08010008)
    1010TA1 - rtems_task_set_priority - set TA3's priority to 2
    1111TA1 - rtems_task_suspend - suspend TA2
  • c/src/tests/sptests/sp12/sp12.scn

    r3235ad9 r5250ff39  
    3636PRI5 - priority of PRI5 is 68
    3737<pause>
    38 TA1 - rtems_semaphore_ident - smid => 0c010001
     38TA1 - rtems_semaphore_ident - smid => 10010001
    3939TA1 - rtems_semaphore_obtain - wait forever on SM2
    4040TA1 - got SM2
  • c/src/tests/sptests/sp13/sp13.scn

    r3235ad9 r5250ff39  
    11*** TEST 13 ***
    2 TA1 - rtems_message_queue_ident - qid => 10010001
     2TA1 - rtems_message_queue_ident - qid => 14010001
    33TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1
    44TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1
  • c/src/tests/sptests/sp15/sp15.scn

    r3235ad9 r5250ff39  
    22INIT - rtems_partition_create - partition 1
    33INIT - rtems_partition_create - partition 2
    4 TA1 - rtems_partition_ident - partition 1 id = 14010001
    5 TA1 - rtems_partition_ident - partition 2 id = 14010002
     4TA1 - rtems_partition_ident - partition 1 id = 18010001
     5TA1 - rtems_partition_ident - partition 2 id = 18010002
    66TA1 - rtems_partition_get_buffer - buffer 1 from partition 1  - 0x00000000
    77TA1 - rtems_partition_get_buffer - buffer 2 from partition 1  - 0x00000200
  • c/src/tests/sptests/sp16/sp16.scn

    r3235ad9 r5250ff39  
    11*** TEST 16 ***
    2 TA1 - rtems_region_ident - rnid => 18010002
     2TA1 - rtems_region_ident - rnid => 1c010002
    33TA1 - rtems_region_get_segment - wait on 100 byte segment from region 2
    44TA1 - got segment from region 2 - 0x00000f78
  • c/src/tests/sptests/sp20/sp20.scn

    r3235ad9 r5250ff39  
    11*** TEST 20 ***
    2 TA1 - rtems_rate_monotonic_create id = 0x20010001
    3 TA1 - rtems_rate_monotonic_ident id = 0x20010001
    4 TA1 - (0x20010001) period 2
    5 TA2 - rtems_rate_monotonic_create id = 0x20010002
    6 TA2 - rtems_rate_monotonic_ident id = 0x20010002
    7 TA2 - (0x20010002) period 2
    8 TA3 - rtems_rate_monotonic_create id = 0x20010003
    9 TA3 - rtems_rate_monotonic_ident id = 0x20010003
    10 TA3 - (0x20010003) period 2
    11 TA4 - rtems_rate_monotonic_create id = 0x20010004
    12 TA4 - rtems_rate_monotonic_ident id = 0x20010004
    13 TA4 - (0x20010004) period 2
    14 TA5 - rtems_rate_monotonic_create id = 0x20010005
    15 TA5 - rtems_rate_monotonic_ident id = 0x20010005
    16 TA5 - (0x20010005) period 100
     2TA1 - rtems_rate_monotonic_create id = 0x24010001
     3TA1 - rtems_rate_monotonic_ident id = 0x24010001
     4TA1 - (0x24010001) period 2
     5TA2 - rtems_rate_monotonic_create id = 0x24010002
     6TA2 - rtems_rate_monotonic_ident id = 0x24010002
     7TA2 - (0x24010002) period 2
     8TA3 - rtems_rate_monotonic_create id = 0x24010003
     9TA3 - rtems_rate_monotonic_ident id = 0x24010003
     10TA3 - (0x24010003) period 2
     11TA4 - rtems_rate_monotonic_create id = 0x24010004
     12TA4 - rtems_rate_monotonic_ident id = 0x24010004
     13TA4 - (0x24010004) period 2
     14TA5 - rtems_rate_monotonic_create id = 0x24010005
     15TA5 - rtems_rate_monotonic_ident id = 0x24010005
     16TA5 - (0x24010005) period 100
    1717TA5 - PERIODS CHECK OK (1)
    1818TA5 - PERIODS CHECK OK (2)
  • c/src/tests/sptests/sp22/sp22.scn

    r3235ad9 r5250ff39  
    11*** TEST 22 ***
    22INIT - rtems_timer_create - creating timer 1
    3 INIT - timer 1 has id (0x8010001)
     3INIT - timer 1 has id (0xc010001)
    44TA1 - rtems_timer_ident - identing timer 1
    5 TA1 - timer 1 has id (0x8010001)
     5TA1 - timer 1 has id (0xc010001)
    66TA1 - rtems_clock_get - 09:00:00   12/31/1988
    77TA1 - rtems_timer_fire_after - timer 1 in 3 seconds
  • c/src/tests/sptests/sp23/sp23.scn

    r3235ad9 r5250ff39  
    11*** TEST 23 ***
    22INIT - rtems_port_create - DP1 - int = 0x00001000   ext = 0x00002000
    3 TA1 - rtems_port_ident - 00010001
     3TA1 - rtems_port_ident - 0x20010001
    44TA1 - rtems_port_external_to_internal - 0x0000200e  =>  0x0000100e
    55TA1 - rtems_port_internal_to_external - 0x0000100e  =>  0x0000200e
  • c/src/tests/sptests/sp23/task1.c

    r3235ad9 r5250ff39  
    3434  status = rtems_port_ident( Port_name[ 1 ], &dpid );
    3535  directive_failed( status, "rtems_port_ident" );
    36   printf( "TA1 - rtems_port_ident - %08x\n", dpid );
     36  printf( "TA1 - rtems_port_ident - 0x%08x\n", dpid );
    3737
    3838  to_be_converted = &External_port_area[ 0xe ];
  • c/src/tests/sptests/sp25/sp25.scn

    r3235ad9 r5250ff39  
    11*** TEST 25 ***
    2 TA1 - rtems_region_ident - 0x18010002
     2TA1 - rtems_region_ident - 0x1c010002
    33TA1 - rtems_region_get_segment - wait on 64 byte segment from region 1
    44TA1 - got segment from region 1 - 0x0000f9b8
  • c/src/tests/sptests/spsize/size.c

    r3235ad9 r5250ff39  
    296296/*taskmp.h*/    0                                         +
    297297
    298 /*tasks.h*/     0                                         +
     298/*tasks.h*/     (sizeof _RTEMS_tasks_Information)         +
    299299
    300300/*thread.h*/    (sizeof _Thread_Dispatch_disable_level)   +
     
    305305                (sizeof _Thread_Heir)                     +
    306306                (sizeof _Thread_Allocated_fp)             +
    307                 (sizeof _Thread_Information)              +
    308307                (sizeof _Thread_BSP_context)              +
    309308
  • cpukit/libmisc/monitor/mon-object.c

    r3235ad9 r5250ff39  
    6161    },
    6262    { RTEMS_OBJECT_TASK,
    63       (void *) &_Thread_Information,
     63      (void *) &_RTEMS_tasks_Information,
    6464      sizeof(rtems_monitor_task_t),
    6565      (rtems_monitor_object_next_fn)        rtems_monitor_manager_next,
  • cpukit/libmisc/stackchk/check.c

    r3235ad9 r5250ff39  
    416416void Stack_check_Dump_usage( void )
    417417{
    418   unsigned32      i;
    419   Thread_Control *the_thread;
    420   unsigned32      hit_running = 0;
     418  unsigned32           i;
     419  unsigned32           class_index;
     420  Thread_Control      *the_thread;
     421  unsigned32           hit_running = 0;
     422  Objects_Information *information;
    421423
    422424  if (stack_check_initialized == 0)
     
    426428    "   ID          NAME         LOW        HIGH      AVAILABLE     USED\n"
    427429  );
    428   for ( i=1 ; i<_Thread_Information.maximum ; i++ ) {
    429     the_thread = (Thread_Control *)_Thread_Information.local_table[ i ];
    430     Stack_check_Dump_threads_usage( the_thread );
    431     if ( the_thread == _Thread_Executing )
    432       hit_running = 1;
     430
     431  for ( class_index = OBJECTS_CLASSES_FIRST ;
     432        class_index <= OBJECTS_CLASSES_LAST ;
     433        class_index++ ) {
     434    information = _Objects_Information_table[ class_index ];
     435    if ( information && information->is_thread ) {
     436      for ( i=1 ; i < information->maximum ; i++ ) {
     437        the_thread = (Thread_Control *)information->local_table[ i ];
     438        Stack_check_Dump_threads_usage( the_thread );
     439        if ( the_thread == _Thread_Executing )
     440          hit_running = 1;
     441      }
     442    }
    433443  }
    434444
  • cpukit/rtems/include/rtems/rtems/tasks.h

    r3235ad9 r5250ff39  
    6363
    6464/*
     65 *  The following defines the information control block used to
     66 *  manage this class of objects.
     67 */
     68
     69EXTERN Objects_Information _RTEMS_tasks_Information;
     70
     71/*
     72 *  _RTEMS_tasks_Manager_initialization
     73 *
     74 *  DESCRIPTION:
     75 *
     76 *  This routine initializes all Task Manager related data structures.
     77 */
     78 
     79void _RTEMS_tasks_Manager_initialization(
     80  unsigned32   maximum_tasks
     81);
     82
     83/*
    6584 *  rtems_task_create
    6685 *
  • cpukit/rtems/inline/rtems/rtems/tasks.inl

    r3235ad9 r5250ff39  
    3131STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
    3232{
    33   return (Thread_Control *) _Objects_Allocate( &_Thread_Information );
     33  return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
    3434}
    3535
     
    4444)
    4545{
    46   _Objects_Free( &_Thread_Information, &the_task->Object );
     46  _Objects_Free( &_RTEMS_tasks_Information, &the_task->Object );
    4747}
    4848
  • cpukit/rtems/macros/rtems/rtems/tasks.inl

    r3235ad9 r5250ff39  
    3030
    3131#define _RTEMS_tasks_Allocate() \
    32   (Thread_Control *) _Objects_Allocate( &_Thread_Information )
     32  (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information )
    3333
    3434/*PAGE
     
    3939
    4040#define _RTEMS_tasks_Free( _the_task ) \
    41   _Objects_Free( &_Thread_Information, &(_the_task)->Object )
     41  _Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object )
    4242
    4343/*PAGE
  • cpukit/rtems/src/dpmem.c

    r3235ad9 r5250ff39  
    4444    sizeof( Dual_ported_memory_Control ),
    4545    FALSE,
    46     RTEMS_MAXIMUM_NAME_LENGTH
     46    RTEMS_MAXIMUM_NAME_LENGTH,
     47    FALSE
    4748  );
    4849}
  • cpukit/rtems/src/msg.c

    r3235ad9 r5250ff39  
    5252    sizeof( Message_queue_Control ),
    5353    FALSE,
    54     RTEMS_MAXIMUM_NAME_LENGTH
     54    RTEMS_MAXIMUM_NAME_LENGTH,
     55    FALSE
    5556  );
    5657}
  • cpukit/rtems/src/part.c

    r3235ad9 r5250ff39  
    4646    sizeof( Partition_Control ),
    4747    FALSE,
    48     RTEMS_MAXIMUM_NAME_LENGTH
     48    RTEMS_MAXIMUM_NAME_LENGTH,
     49    FALSE
    4950  );
    5051
  • cpukit/rtems/src/ratemon.c

    r3235ad9 r5250ff39  
    4848    sizeof( Rate_monotonic_Control ),
    4949    FALSE,
    50     RTEMS_MAXIMUM_NAME_LENGTH
     50    RTEMS_MAXIMUM_NAME_LENGTH,
     51    FALSE
    5152  );
    5253}
  • cpukit/rtems/src/region.c

    r3235ad9 r5250ff39  
    4646    sizeof( Region_Control ),
    4747    FALSE,
    48     RTEMS_MAXIMUM_NAME_LENGTH
     48    RTEMS_MAXIMUM_NAME_LENGTH,
     49    FALSE
    4950  );
    5051}
  • cpukit/rtems/src/rtemstimer.c

    r3235ad9 r5250ff39  
    4545    sizeof( Timer_Control ),
    4646    FALSE,
    47     RTEMS_MAXIMUM_NAME_LENGTH
     47    RTEMS_MAXIMUM_NAME_LENGTH,
     48    FALSE
    4849  );
    4950}
  • cpukit/rtems/src/sem.c

    r3235ad9 r5250ff39  
    6363    sizeof( Semaphore_Control ),
    6464    FALSE,
    65     RTEMS_MAXIMUM_NAME_LENGTH
     65    RTEMS_MAXIMUM_NAME_LENGTH,
     66    FALSE
    6667  );
    6768}
  • cpukit/rtems/src/taskmp.c

    r3235ad9 r5250ff39  
    195195
    196196      ignored = _Objects_MP_Open(
    197                   &_Thread_Information,
     197                  &_RTEMS_tasks_Information,
    198198                  the_packet->name,
    199199                  the_packet->Prefix.id,
     
    206206    case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
    207207
    208       _Objects_MP_Close( &_Thread_Information, the_packet->Prefix.id );
     208      _Objects_MP_Close( &_RTEMS_tasks_Information, the_packet->Prefix.id );
    209209
    210210      _MPCI_Return_packet( the_packet_prefix );
  • cpukit/rtems/src/tasks.c

    r3235ad9 r5250ff39  
    2929/*PAGE
    3030 *
     31 *  _RTEMS_tasks_Manager_initialization
     32 *
     33 *  This routine initializes all Task Manager related data structures.
     34 *
     35 *  Input parameters:
     36 *    maximum_tasks       - number of tasks to initialize
     37 *
     38 *  Output parameters:  NONE
     39 */
     40
     41void _RTEMS_tasks_Manager_initialization(
     42  unsigned32   maximum_tasks
     43)
     44{
     45  _Objects_Initialize_information(
     46    &_RTEMS_tasks_Information,
     47    OBJECTS_RTEMS_TASKS,
     48    TRUE,
     49    maximum_tasks,
     50    sizeof( Thread_Control ),
     51    FALSE,
     52    RTEMS_MAXIMUM_NAME_LENGTH,
     53    TRUE
     54  );
     55}
     56
     57/*PAGE
     58 *
    3159 *  rtems_task_create
    3260 *
     
    137165
    138166  if ( _Attributes_Is_global( the_attribute_set ) &&
    139        !( _Objects_MP_Open( &_Thread_Information, name,
     167       !( _Objects_MP_Open( &_RTEMS_tasks_Information, name,
    140168                            the_thread->Object.id, FALSE ) ) ) {
    141169    _RTEMS_tasks_Free( the_thread );
     
    158186  _ASR_Initialize( &the_thread->Signal );
    159187
    160   _Objects_Open( &_Thread_Information, &the_thread->Object, &name );
     188  _Objects_Open( &_RTEMS_tasks_Information, &the_thread->Object, &name );
    161189
    162190  *id = the_thread->Object.id;
     
    200228{
    201229  if ( name != OBJECTS_ID_OF_SELF )
    202     return( _Objects_Name_to_id( &_Thread_Information, &name, node, id ) );
     230    return( _Objects_Name_to_id( &_RTEMS_tasks_Information, &name, node, id ) );
    203231
    204232  *id = _Thread_Executing->Object.id;
     
    369397      return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
    370398    case OBJECTS_LOCAL:
    371       _Objects_Close( &_Thread_Information, &the_thread->Object );
     399      _Objects_Close( &_RTEMS_tasks_Information, &the_thread->Object );
    372400
    373401      _Thread_Set_state( the_thread, STATES_TRANSIENT );
     
    389417      if ( _Attributes_Is_global( the_thread->attribute_set ) ) {
    390418
    391         _Objects_MP_Close( &_Thread_Information, the_thread->Object.id );
     419        _Objects_MP_Close( &_RTEMS_tasks_Information, the_thread->Object.id );
    392420
    393421        _RTEMS_tasks_MP_Send_process_packet(
  • cpukit/sapi/src/exinit.c

    r3235ad9 r5250ff39  
    153153
    154154  _Thread_Handler_initialization(
    155     configuration_table->maximum_tasks,
    156155    configuration_table->ticks_per_timeslice,
    157156    multiprocessing_table->maximum_proxies
     
    165164
    166165  _Multiprocessing_Manager_initialization();
     166
     167  _RTEMS_tasks_Manager_initialization( configuration_table->maximum_tasks );
    167168
    168169  _Timer_Manager_initialization( configuration_table->maximum_timers );
  • cpukit/sapi/src/extension.c

    r3235ad9 r5250ff39  
    4343    sizeof( Extension_Control ),
    4444    FALSE,
    45     RTEMS_MAXIMUM_NAME_LENGTH
     45    RTEMS_MAXIMUM_NAME_LENGTH,
     46    FALSE
    4647  );
    4748}
  • cpukit/score/include/rtems/score/object.h

    r3235ad9 r5250ff39  
    7979typedef enum {
    8080  OBJECTS_NO_CLASS             =  0,
    81   OBJECTS_RTEMS_TASKS          =  1,
    82   OBJECTS_RTEMS_TIMERS         =  2,
    83   OBJECTS_RTEMS_SEMAPHORES     =  3,
    84   OBJECTS_RTEMS_MESSAGE_QUEUES =  4,
    85   OBJECTS_RTEMS_PARTITIONS     =  5,
    86   OBJECTS_RTEMS_REGIONS        =  6,
    87   OBJECTS_RTEMS_PORTS          =  7,
    88   OBJECTS_RTEMS_PERIODS        =  8,
    89   OBJECTS_RTEMS_EXTENSIONS     =  9
     81  OBJECTS_INTERNAL_THREADS     =  1,
     82  OBJECTS_RTEMS_TASKS          =  2,
     83  OBJECTS_RTEMS_TIMERS         =  3,
     84  OBJECTS_RTEMS_SEMAPHORES     =  4,
     85  OBJECTS_RTEMS_MESSAGE_QUEUES =  5,
     86  OBJECTS_RTEMS_PARTITIONS     =  6,
     87  OBJECTS_RTEMS_REGIONS        =  7,
     88  OBJECTS_RTEMS_PORTS          =  8,
     89  OBJECTS_RTEMS_PERIODS        =  9,
     90  OBJECTS_RTEMS_EXTENSIONS     = 10
    9091} Objects_Classes;
     92
     93#define OBJECTS_CLASSES_FIRST  OBJECTS_NO_CLASS
     94#define OBJECTS_CLASSES_LAST   OBJECTS_RTEMS_EXTENSIONS
    9195
    9296/*
     
    129133  boolean           is_string;       /* TRUE if names are strings */
    130134  unsigned32        name_length;     /* maximum length of names */
     135  boolean           is_thread;       /* TRUE if these are threads */
     136                                     /*   irregardless of API */
    131137}   Objects_Information;
    132138
     
    137143
    138144EXTERN unsigned32  _Objects_Local_node;
     145
     146/*
     147 *  The following is the list of information blocks for each object
     148 *  class.  From the ID, we can go to one of these information blocks,
     149 *  and obtain a pointer to the appropriate object control block.
     150 */
     151
     152EXTERN Objects_Information
     153    *_Objects_Information_table[OBJECTS_CLASSES_LAST + 1];
    139154
    140155/*
     
    202217  unsigned32           size,
    203218  boolean              is_string,
    204   unsigned32           maximum_name_length
     219  unsigned32           maximum_name_length,
     220  boolean              is_task
    205221);
    206222
  • cpukit/score/include/rtems/score/thread.h

    r3235ad9 r5250ff39  
    230230
    231231/*
    232  *  The following defines the information control block used to
    233  *  manage this class of objects.
    234  */
    235 
    236 EXTERN Objects_Information _Thread_Information;
    237 
    238 /*
    239232 *  The following context area contains the context of the "thread"
    240233 *  which invoked rtems_initialize_executive.  This context is restored
     
    255248
    256249void _Thread_Handler_initialization (
    257   unsigned32 maximum_tasks,
    258250  unsigned32 ticks_per_timeslice,
    259251  unsigned32 maximum_proxies
  • cpukit/score/inline/rtems/score/thread.inl

    r3235ad9 r5250ff39  
    232232 *  _Thread_Get
    233233 *
     234 *  NOTE:  XXX... This routine may be able to be optimized.
    234235 */
    235236
     
    239240)
    240241{
     242  Objects_Classes      the_class;
     243  Objects_Information *information;
     244 
    241245  if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
    242      _Thread_Disable_dispatch();
    243      *location = OBJECTS_LOCAL;
    244      return( _Thread_Executing );
     246    _Thread_Disable_dispatch();
     247    *location = OBJECTS_LOCAL;
     248    return( _Thread_Executing );
    245249  }
    246 
    247   return (Thread_Control *)
    248           _Objects_Get( &_Thread_Information, id, location );
     250 
     251  the_class = rtems_get_class( id );
     252 
     253  if ( the_class > OBJECTS_CLASSES_LAST ) {
     254    *location = OBJECTS_ERROR;
     255    return (Thread_Control *) 0;
     256  }
     257 
     258  information = _Objects_Information_table[ the_class ];
     259 
     260  if ( !information || !information->is_thread ) {
     261    *location = OBJECTS_ERROR;
     262    return (Thread_Control *) 0;
     263  }
     264 
     265  return (Thread_Control *) _Objects_Get( information, id, location );
    249266}
    250267
  • cpukit/score/src/object.c

    r3235ad9 r5250ff39  
    6969  unsigned32           size,
    7070  boolean              is_string,
    71   unsigned32           maximum_name_length
     71  unsigned32           maximum_name_length,
     72  boolean              is_thread
    7273)
    7374{
     
    8182  information->the_class = the_class;
    8283  information->is_string = is_string;
     84  information->is_thread = is_thread;
     85
     86  /*
     87   *  Set the entry in the object information table.
     88   */
     89
     90  _Objects_Information_table[ the_class ] = information;
    8391
    8492  /*
     
    380388Objects_Control *_Objects_Get(
    381389  Objects_Information *information,
    382   Objects_Id                  id,
    383   Objects_Locations          *location
     390  Objects_Id           id,
     391  Objects_Locations   *location
    384392)
    385393{
  • cpukit/score/src/thread.c

    r3235ad9 r5250ff39  
    3636 *
    3737 *  Input parameters:
    38  *    maximum_tasks       - number of tasks to initialize
    3938 *    ticks_per_timeslice - clock ticks per quantum
     39 *    maximum_proxies     - number of proxies to initialize
    4040 *
    4141 *  Output parameters:  NONE
     
    4343
    4444void _Thread_Handler_initialization(
    45   unsigned32   maximum_tasks,
    4645  unsigned32   ticks_per_timeslice,
    4746  unsigned32   maximum_proxies
     
    5756  _Thread_Ticks_remaining_in_timeslice = ticks_per_timeslice;
    5857  _Thread_Ticks_per_timeslice          = ticks_per_timeslice;
    59 
    60   _Objects_Initialize_information(
    61     &_Thread_Information,
    62     OBJECTS_RTEMS_TASKS,
    63     TRUE,
    64     maximum_tasks,
    65     sizeof( Thread_Control ),
    66     FALSE,
    67     RTEMS_MAXIMUM_NAME_LENGTH
    68   );
    6958
    7059  _Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
     
    790779 *  NOTE:  If we are not using static inlines, this must be a real
    791780 *         subroutine call.
     781 *
     782 *  NOTE:  XXX... This routine may be able to be optimized.
    792783 */
    793784
     
    795786
    796787STATIC INLINE Thread_Control *_Thread_Get (
    797   Objects_Id         id,
    798   Objects_Locations *location
    799 )
    800 {
     788  Objects_Id           id,
     789  Objects_Locations   *location
     790)
     791{
     792  Objects_Classes      the_class;
     793  Objects_Information *information;
     794 
    801795  if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
    802      _Thread_Disable_dispatch();
    803      *location = OBJECTS_LOCAL;
    804      return( _Thread_Executing );
    805   }
    806 
    807   return (Thread_Control *) _Objects_Get( &_Thread_Information, id, location );
     796    _Thread_Disable_dispatch();
     797    *location = OBJECTS_LOCAL;
     798    return( _Thread_Executing );
     799  }
     800 
     801  the_class = rtems_get_class( id );
     802 
     803  if ( the_class > OBJECTS_CLASSES_LAST ) {
     804    *location = OBJECTS_ERROR;
     805    return (Thread_Control *) 0;
     806  }
     807 
     808  information = _Objects_Information_table[ the_class ];
     809 
     810  if ( !information || !information->is_thread ) {
     811    *location = OBJECTS_ERROR;
     812    return (Thread_Control *) 0;
     813  }
     814 
     815  return (Thread_Control *) _Objects_Get( information, id, location );
    808816}
    809817#endif
    810 
  • testsuites/sptests/sp02/sp02.scn

    r3235ad9 r5250ff39  
    66TA2 - rtems_task_wake_after - sleep 1 minute
    77TA3 - rtems_task_wake_after - sleep 5 seconds
    8 TA1 - rtems_task_ident - tid of TA2 (0x04010007)
    9 TA1 - rtems_task_ident - tid of TA3 (0x04010008)
     8TA1 - rtems_task_ident - tid of TA2 (0x08010007)
     9TA1 - rtems_task_ident - tid of TA3 (0x08010008)
    1010TA1 - rtems_task_set_priority - set TA3's priority to 2
    1111TA1 - rtems_task_suspend - suspend TA2
  • testsuites/sptests/sp12/sp12.scn

    r3235ad9 r5250ff39  
    3636PRI5 - priority of PRI5 is 68
    3737<pause>
    38 TA1 - rtems_semaphore_ident - smid => 0c010001
     38TA1 - rtems_semaphore_ident - smid => 10010001
    3939TA1 - rtems_semaphore_obtain - wait forever on SM2
    4040TA1 - got SM2
  • testsuites/sptests/sp13/sp13.scn

    r3235ad9 r5250ff39  
    11*** TEST 13 ***
    2 TA1 - rtems_message_queue_ident - qid => 10010001
     2TA1 - rtems_message_queue_ident - qid => 14010001
    33TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1
    44TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1
  • testsuites/sptests/sp15/sp15.scn

    r3235ad9 r5250ff39  
    22INIT - rtems_partition_create - partition 1
    33INIT - rtems_partition_create - partition 2
    4 TA1 - rtems_partition_ident - partition 1 id = 14010001
    5 TA1 - rtems_partition_ident - partition 2 id = 14010002
     4TA1 - rtems_partition_ident - partition 1 id = 18010001
     5TA1 - rtems_partition_ident - partition 2 id = 18010002
    66TA1 - rtems_partition_get_buffer - buffer 1 from partition 1  - 0x00000000
    77TA1 - rtems_partition_get_buffer - buffer 2 from partition 1  - 0x00000200
  • testsuites/sptests/sp16/sp16.scn

    r3235ad9 r5250ff39  
    11*** TEST 16 ***
    2 TA1 - rtems_region_ident - rnid => 18010002
     2TA1 - rtems_region_ident - rnid => 1c010002
    33TA1 - rtems_region_get_segment - wait on 100 byte segment from region 2
    44TA1 - got segment from region 2 - 0x00000f78
  • testsuites/sptests/sp20/sp20.scn

    r3235ad9 r5250ff39  
    11*** TEST 20 ***
    2 TA1 - rtems_rate_monotonic_create id = 0x20010001
    3 TA1 - rtems_rate_monotonic_ident id = 0x20010001
    4 TA1 - (0x20010001) period 2
    5 TA2 - rtems_rate_monotonic_create id = 0x20010002
    6 TA2 - rtems_rate_monotonic_ident id = 0x20010002
    7 TA2 - (0x20010002) period 2
    8 TA3 - rtems_rate_monotonic_create id = 0x20010003
    9 TA3 - rtems_rate_monotonic_ident id = 0x20010003
    10 TA3 - (0x20010003) period 2
    11 TA4 - rtems_rate_monotonic_create id = 0x20010004
    12 TA4 - rtems_rate_monotonic_ident id = 0x20010004
    13 TA4 - (0x20010004) period 2
    14 TA5 - rtems_rate_monotonic_create id = 0x20010005
    15 TA5 - rtems_rate_monotonic_ident id = 0x20010005
    16 TA5 - (0x20010005) period 100
     2TA1 - rtems_rate_monotonic_create id = 0x24010001
     3TA1 - rtems_rate_monotonic_ident id = 0x24010001
     4TA1 - (0x24010001) period 2
     5TA2 - rtems_rate_monotonic_create id = 0x24010002
     6TA2 - rtems_rate_monotonic_ident id = 0x24010002
     7TA2 - (0x24010002) period 2
     8TA3 - rtems_rate_monotonic_create id = 0x24010003
     9TA3 - rtems_rate_monotonic_ident id = 0x24010003
     10TA3 - (0x24010003) period 2
     11TA4 - rtems_rate_monotonic_create id = 0x24010004
     12TA4 - rtems_rate_monotonic_ident id = 0x24010004
     13TA4 - (0x24010004) period 2
     14TA5 - rtems_rate_monotonic_create id = 0x24010005
     15TA5 - rtems_rate_monotonic_ident id = 0x24010005
     16TA5 - (0x24010005) period 100
    1717TA5 - PERIODS CHECK OK (1)
    1818TA5 - PERIODS CHECK OK (2)
  • testsuites/sptests/sp22/sp22.scn

    r3235ad9 r5250ff39  
    11*** TEST 22 ***
    22INIT - rtems_timer_create - creating timer 1
    3 INIT - timer 1 has id (0x8010001)
     3INIT - timer 1 has id (0xc010001)
    44TA1 - rtems_timer_ident - identing timer 1
    5 TA1 - timer 1 has id (0x8010001)
     5TA1 - timer 1 has id (0xc010001)
    66TA1 - rtems_clock_get - 09:00:00   12/31/1988
    77TA1 - rtems_timer_fire_after - timer 1 in 3 seconds
  • testsuites/sptests/sp23/sp23.scn

    r3235ad9 r5250ff39  
    11*** TEST 23 ***
    22INIT - rtems_port_create - DP1 - int = 0x00001000   ext = 0x00002000
    3 TA1 - rtems_port_ident - 00010001
     3TA1 - rtems_port_ident - 0x20010001
    44TA1 - rtems_port_external_to_internal - 0x0000200e  =>  0x0000100e
    55TA1 - rtems_port_internal_to_external - 0x0000100e  =>  0x0000200e
  • testsuites/sptests/sp23/task1.c

    r3235ad9 r5250ff39  
    3434  status = rtems_port_ident( Port_name[ 1 ], &dpid );
    3535  directive_failed( status, "rtems_port_ident" );
    36   printf( "TA1 - rtems_port_ident - %08x\n", dpid );
     36  printf( "TA1 - rtems_port_ident - 0x%08x\n", dpid );
    3737
    3838  to_be_converted = &External_port_area[ 0xe ];
  • testsuites/sptests/sp25/sp25.scn

    r3235ad9 r5250ff39  
    11*** TEST 25 ***
    2 TA1 - rtems_region_ident - 0x18010002
     2TA1 - rtems_region_ident - 0x1c010002
    33TA1 - rtems_region_get_segment - wait on 64 byte segment from region 1
    44TA1 - got segment from region 1 - 0x0000f9b8
  • testsuites/sptests/spsize/size.c

    r3235ad9 r5250ff39  
    296296/*taskmp.h*/    0                                         +
    297297
    298 /*tasks.h*/     0                                         +
     298/*tasks.h*/     (sizeof _RTEMS_tasks_Information)         +
    299299
    300300/*thread.h*/    (sizeof _Thread_Dispatch_disable_level)   +
     
    305305                (sizeof _Thread_Heir)                     +
    306306                (sizeof _Thread_Allocated_fp)             +
    307                 (sizeof _Thread_Information)              +
    308307                (sizeof _Thread_BSP_context)              +
    309308
Note: See TracChangeset for help on using the changeset viewer.