Changeset 95fbca1 in rtems for c/src/exec/score/include


Ignore:
Timestamp:
08/18/95 21:41:27 (27 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
9863dbf
Parents:
b06e68ef
Message:

+ 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.

Location:
c/src/exec/score/include/rtems/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/include/rtems/score/object.h

    rb06e68ef r95fbca1  
    3434/*
    3535 *  The following type defines the control block used to manage
    36  *  object IDs.
     36 *  object IDs.  The format is as follows (0=LSB):
     37 *
     38 *     Bits  0 .. 15    = index
     39 *     Bits 16 .. 25    = node
     40 *     Bits 26 .. 31    = class
    3741 */
    3842
    3943typedef unsigned32 Objects_Id;
     44
     45#define OBJECTS_INDEX_START_BIT  0
     46#define OBJECTS_NODE_START_BIT  16
     47#define OBJECTS_CLASS_START_BIT 26
     48
     49#define OBJECTS_INDEX_MASK      0x0000ffff
     50#define OBJECTS_NODE_MASK       0x03ff0000
     51#define OBJECTS_CLASS_MASK      0xfc000000
     52
     53#define OBJECTS_INDEX_VALID_BITS  0x0000ffff
     54#define OBJECTS_NODE_VALID_BITS   0x000003ff
     55#define OBJECTS_CLASS_VALID_BITS  0x000000cf
     56
     57/*
     58 *  This enumerated type is used in the class field of the object ID.
     59 */
     60
     61typedef enum {
     62  OBJECTS_NO_CLASS             =  0,
     63  OBJECTS_RTEMS_TASKS          =  1,
     64  OBJECTS_RTEMS_TIMERS         =  2,
     65  OBJECTS_RTEMS_SEMAPHORES     =  3,
     66  OBJECTS_RTEMS_MESSAGE_QUEUES =  4,
     67  OBJECTS_RTEMS_PARTITIONS     =  5,
     68  OBJECTS_RTEMS_REGIONS        =  6,
     69  OBJECTS_RTEMS_PORTS          =  7,
     70  OBJECTS_RTEMS_PERIODS        =  8,
     71  OBJECTS_RTEMS_EXTENSIONS     =  9
     72} Objects_Classes;
    4073
    4174/*
     
    5790
    5891typedef struct {
    59   Chain_Node Node;
    60   Objects_Id id;
     92  Chain_Node    Node;
     93  Objects_Id    id;
     94  Objects_Name *name;
    6195}   Objects_Control;
    6296
     
    67101
    68102typedef struct {
     103  Objects_Classes   the_class;       /* Class of this object */
    69104  Objects_Id        minimum_id;      /* minimum valid id of this type */
    70105  Objects_Id        maximum_id;      /* maximum valid id of this type */
     
    89124 */
    90125
    91 #define OBJECTS_ID_OF_SELF 0
     126#define OBJECTS_ID_OF_SELF ((Objects_Id) 0)
    92127
    93128/*
     
    108143
    109144#define RTEMS_OBJECT_ID_INITIAL(node)   (_Objects_Build_id(      \
     145                                            OBJECTS_NO_CLASS, \
    110146                                            node, \
    111147                                            RTEMS_OBJECT_ID_INITIAL_INDEX))
    112 #define RTEMS_OBJECT_ID_FINAL           ((Objects_Id) ~0)
     148#define RTEMS_OBJECT_ID_FINAL           ((Objects_Id)~0)
    113149
    114150/*
     
    141177void _Objects_Initialize_information (
    142178  Objects_Information *information,
     179  Objects_Classes      the_class,
    143180  boolean              supports_global,
    144181  unsigned32           maximum,
     
    265302
    266303STATIC INLINE Objects_Id _Objects_Build_id(
    267   unsigned32 node,
    268   unsigned32 index
     304  Objects_Classes  the_class,
     305  unsigned32       node,
     306  unsigned32       index
     307);
     308
     309/*
     310 *  rtems_get_class
     311 *
     312 *  DESCRIPTION:
     313 *
     314 *  This function returns the class portion of the ID.
     315 *
     316 */
     317 
     318STATIC INLINE Objects_Classes rtems_get_class(
     319  Objects_Id id
    269320);
    270321
  • c/src/exec/score/include/rtems/score/thread.h

    rb06e68ef r95fbca1  
    134134typedef struct {
    135135  Objects_Control          Object;
    136   Objects_Name             name;
    137136  States_Control           current_state;
    138   rtems_task_priority         current_priority;
    139   rtems_task_priority         real_priority;
     137  rtems_task_priority      current_priority;
     138  rtems_task_priority      real_priority;
    140139  unsigned32               resource_count;
    141140  Thread_Wait_information  Wait;
    142141  Watchdog_Control         Timer;
    143   rtems_packet_prefix        *receive_packet;
     142  rtems_packet_prefix     *receive_packet;
    144143     /****************** end of common block ********************/
    145144  Chain_Node               Active;
     
    157156typedef struct {
    158157  Objects_Control           Object;
    159   Objects_Name              name;
    160158  States_Control            current_state;
    161159  rtems_task_priority       current_priority;
Note: See TracChangeset for help on using the changeset viewer.