Ignore:
Timestamp:
Nov 16, 2018, 6:06:12 AM (9 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
52c7cb1
Parents:
e0caabe
git-author:
Sebastian Huber <sebastian.huber@…> (11/16/18 06:06:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/21/18 07:06:27)
Message:

score: Remove support for RTEMS_USE_16_BIT_OBJECT

The RTEMS_USE_16_BIT_OBJECT define is not set by an RTEMS port. Remove
support for 16-bit object identifiers. If someone really wants to use
RTEMS on a 16-bit target, then it is better to use self-contained
objects instead of playing around with object identifier optimizations.

Update #3603.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/score/object.h

    re0caabe r59e7209f  
    6262} Objects_Name;
    6363
    64 #if defined(RTEMS_USE_16_BIT_OBJECT)
    65 /**
    66  *  The following type defines the control block used to manage
    67  *  object IDs.  The format is as follows (0=LSB):
    68  *
    69  *     Bits  0 ..  7    = index  (up to 254 objects of a type)
    70  *     Bits  8 .. 10    = API    (up to 7 API classes)
    71  *     Bits 11 .. 15    = class  (up to 31 object types per API)
    72  */
    73 typedef uint16_t   Objects_Id;
    74 
    75 /**
    76  * This type is used to store the maximum number of allowed objects
    77  * of each type.
    78  */
    79 typedef uint8_t    Objects_Maximum;
    80 
    81 #define OBJECTS_INDEX_START_BIT  0U
    82 #define OBJECTS_API_START_BIT    8U
    83 #define OBJECTS_CLASS_START_BIT 11U
    84 
    85 #define OBJECTS_INDEX_MASK      (Objects_Id)0x00ffU
    86 #define OBJECTS_API_MASK        (Objects_Id)0x0700U
    87 #define OBJECTS_CLASS_MASK      (Objects_Id)0xF800U
    88 
    89 #define OBJECTS_INDEX_VALID_BITS  (Objects_Id)0x00ffU
    90 #define OBJECTS_API_VALID_BITS    (Objects_Id)0x0007U
    91 /* OBJECTS_NODE_VALID_BITS should not be used with 16 bit Ids */
    92 #define OBJECTS_CLASS_VALID_BITS  (Objects_Id)0x001fU
    93 
    94 #define OBJECTS_UNLIMITED_OBJECTS 0x8000U
    95 
    96 #define OBJECTS_ID_INITIAL_INDEX  (0)
    97 #define OBJECTS_ID_FINAL_INDEX    (0xff)
    98 
    99 #else
    10064/**
    10165 *  The following type defines the control block used to manage
     
    197161 */
    198162#define OBJECTS_ID_FINAL_INDEX    (0xffffU)
    199 #endif
    200163
    201164/**
     
    314277)
    315278{
    316   /*
    317    * If using 16-bit Ids, then there is no node field and it MUST
    318    * be a single processor system.
    319    */
    320   #if defined(RTEMS_USE_16_BIT_OBJECT)
    321     return 1;
    322   #else
    323     return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
    324   #endif
     279  return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
    325280}
    326281
     
    362317  return (( (Objects_Id) the_api )   << OBJECTS_API_START_BIT)   |
    363318         (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
    364          #if !defined(RTEMS_USE_16_BIT_OBJECT)
    365            (( (Objects_Id) node )    << OBJECTS_NODE_START_BIT)  |
    366          #endif
     319         (( (Objects_Id) node )      << OBJECTS_NODE_START_BIT)  |
    367320         (( (Objects_Id) index )     << OBJECTS_INDEX_START_BIT);
    368321}
Note: See TracChangeset for help on using the changeset viewer.