Changeset f4a8ee1 in rtems for cpukit/score/inline


Ignore:
Timestamp:
Mar 17, 1999, 4:01:03 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
55b8fef2
Parents:
e9e01dd6
Message:

Unlimited objects patch from Chris Johns <ccj@…>. Email follows:

First, the unlimited patch. I have compiled the unlmited patch for the
Linux posix BSP only and it seems to work cleanly. I would like a really
major application run on this change before commiting as the changes are
very core and significant. I am currently building all the tests to run.

I have no targets suitable to test on at the moment.

I have tested the patch for inline functions and macros.

Turning macros on has found some core bugs. I have fixed these but have
not run all the tests. Please review the patch for these changes. They
are:

1) The conditional compilation for MP support broke the core messages
code. You cannot embed a conditional macro in another macro. The Send
and Urgent Send calls are macros.

2) User extensions handler initialisation now has two parameters. I have
updated the macros to support the extra parameter.

The patch also contains the gcc-target-default.cfg fix required to build
the kernel. More of a by product than a fix for you.

Location:
cpukit/score/inline/rtems/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/inline/rtems/score/coremsg.inl

    re9e01dd6 rf4a8ee1  
    4242    size,
    4343    id,
     44#if defined(RTEMS_MULTIPROCESSING)
    4445    api_message_queue_mp_support,
     46#else
     47    NULL,
     48#endif
    4549    CORE_MESSAGE_QUEUE_SEND_REQUEST
    4650  );
     
    6973    size,
    7074    id,
     75#if defined(RTEMS_MULTIPROCESSING)
    7176    api_message_queue_mp_support,
     77#else
     78    NULL,
     79#endif
    7280    CORE_MESSAGE_QUEUE_URGENT_REQUEST
    7381 );
  • cpukit/score/inline/rtems/score/object.inl

    re9e01dd6 rf4a8ee1  
    159159/*PAGE
    160160 *
    161  *  _Objects_Allocate
    162  *
    163  *  DESCRIPTION:
    164  *
    165  *  This function allocates a object control block from
    166  *  the inactive chain of free object control blocks.
    167  */
    168 
    169 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Allocate(
    170   Objects_Information *information
    171 )
    172 {
    173   return (Objects_Control *) _Chain_Get( &information->Inactive );
    174 }
    175 
    176 /*PAGE
    177  *
    178  *  _Objects_Free
    179  *
    180  *  DESCRIPTION:
    181  *
    182  *  This function frees a object control block to the
    183  *  inactive chain of free object control blocks.
    184  */
    185 
    186 RTEMS_INLINE_ROUTINE void _Objects_Free(
     161 *  _Objects_Get_local_object
     162 *
     163 *  DESCRIPTION:
     164 *
     165 *  This function returns a pointer to the local_table object
     166 *  referenced by the index.
     167 */
     168
     169RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
    187170  Objects_Information *information,
     171  unsigned32           index
     172)
     173{
     174  if ( index > information->maximum)
     175    return NULL;
     176  return ( information->local_table[ index ] );
     177}
     178
     179/*PAGE
     180 *
     181 *  _Objects_Set_local_object
     182 *
     183 *  DESCRIPTION:
     184 *
     185 *  This function sets the pointer to the local_table object
     186 *  referenced by the index.
     187 */
     188
     189RTEMS_INLINE_ROUTINE void _Objects_Set_local_object(
     190  Objects_Information *information,
     191  unsigned32           index,
    188192  Objects_Control     *the_object
    189193)
    190194{
    191   _Chain_Append( &information->Inactive, &the_object->Node );
     195  if ( index <= information->maximum)
     196    information->local_table[ index ] = the_object;
     197}
     198
     199
     200/*PAGE
     201 *
     202 *  _Objects_Get_information
     203 *
     204 *  DESCRIPTION:
     205 *
     206 *  This function return the information structure given
     207 *  an id of an object.
     208 */
     209 
     210RTEMS_INLINE_ROUTINE Objects_Information *_Objects_Get_information(
     211  Objects_Id  id
     212)
     213{
     214  Objects_Classes  the_class;
     215
     216  the_class = _Objects_Get_class( id );
     217
     218  if ( !_Objects_Is_class_valid( the_class ) )
     219    return NULL;
     220
     221  return _Objects_Information_table[ the_class ];
    192222}
    193223
     
    211241
    212242  index = _Objects_Get_index( the_object->id );
    213   information->local_table[ index ] = the_object;
     243  _Objects_Set_local_object( information, index, the_object );
    214244
    215245  if ( information->is_string )
     
    237267
    238268  index = _Objects_Get_index( the_object->id );
    239   information->local_table[ index ] = (Objects_Control *) NULL;
     269  _Objects_Set_local_object( information, index, NULL );
    240270  _Objects_Clear_name( the_object->name, information->name_length );
    241271}
Note: See TracChangeset for help on using the changeset viewer.