Changeset 822ec58 in rtems


Ignore:
Timestamp:
May 3, 2016, 7:57:38 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
49a134d
Parents:
8c77150
git-author:
Sebastian Huber <sebastian.huber@…> (05/03/16 07:57:38)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/04/16 05:24:31)
Message:

score: Add _Thread_MP_Is_remote()

Location:
cpukit/score
Files:
3 edited

Legend:

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

    r8c77150 r822ec58  
    482482  bool              prepend_it
    483483);
     484
     485RTEMS_INLINE_ROUTINE Objects_Information *_Thread_Get_objects_information(
     486  Objects_Id id
     487)
     488{
     489  uint32_t the_api;
     490
     491  the_api = _Objects_Get_API( id );
     492
     493  if ( !_Objects_Is_api_valid( the_api ) ) {
     494    return NULL;
     495  }
     496
     497  /*
     498   * Threads are always first class :)
     499   *
     500   * There is no need to validate the object class of the object identifier,
     501   * since this will be done by the object get methods.
     502   */
     503  return _Objects_Information_table[ the_api ][ 1 ];
     504}
    484505
    485506/**
  • cpukit/score/include/rtems/score/threadmp.h

    r8c77150 r822ec58  
    9292void _Thread_MP_Free_proxy( Thread_Control *the_thread );
    9393
     94RTEMS_INLINE_ROUTINE bool _Thread_MP_Is_remote( Objects_Id id )
     95{
     96  Objects_Information *information;
     97
     98  information = _Thread_Get_objects_information( id );
     99  if ( information == NULL ) {
     100    return false;
     101  }
     102
     103  return _Objects_MP_Is_remote( information, id ) == OBJECTS_REMOTE;
     104}
    94105
    95106/**@}*/
  • cpukit/score/src/threadget.c

    r8c77150 r822ec58  
    2121
    2222#include <rtems/score/threadimpl.h>
    23 
    24 static Objects_Information *_Thread_Get_objects_information(
    25   Objects_Id id
    26 )
    27 {
    28   uint32_t the_api;
    29 
    30   the_api = _Objects_Get_API( id );
    31 
    32   if ( !_Objects_Is_api_valid( the_api ) ) {
    33     return NULL;
    34   }
    35 
    36   /*
    37    * Threads are always first class :)
    38    *
    39    * There is no need to validate the object class of the object identifier,
    40    * since this will be done by the object get methods.
    41    */
    42   return _Objects_Information_table[ the_api ][ 1 ];
    43 }
    4423
    4524Thread_Control *_Thread_Get(
Note: See TracChangeset for help on using the changeset viewer.