diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-09 10:09:24 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-15 09:29:31 +0200 |
commit | b427a92adfd16e8d68b275b44337f54f6ab0a3ca (patch) | |
tree | 07d5c10ecb3fec438ef9fcacf9d5960b3e558d9e /cpukit/score | |
parent | score: Add scheduler name (diff) | |
download | rtems-b427a92adfd16e8d68b275b44337f54f6ab0a3ca.tar.bz2 |
rtems: Add scheduler identification
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/include/rtems/score/object.h | 3 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/objectimpl.h | 9 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/schedulerimpl.h | 10 |
3 files changed, 21 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h index 0ccafbfac9..4eb66ad487 100644 --- a/cpukit/score/include/rtems/score/object.h +++ b/cpukit/score/include/rtems/score/object.h @@ -217,7 +217,8 @@ typedef enum { OBJECTS_NO_API = 0, OBJECTS_INTERNAL_API = 1, OBJECTS_CLASSIC_API = 2, - OBJECTS_POSIX_API = 3 + OBJECTS_POSIX_API = 3, + OBJECTS_FAKE_OBJECTS_API = 7 } Objects_APIs; /** This macro is used to generically specify the last API index. */ diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h index 383f0a738b..4e626ae663 100644 --- a/cpukit/score/include/rtems/score/objectimpl.h +++ b/cpukit/score/include/rtems/score/objectimpl.h @@ -100,6 +100,15 @@ typedef enum { /** This macro is used to generically specify the last API index. */ #define OBJECTS_POSIX_CLASSES_LAST OBJECTS_POSIX_RWLOCKS +/* + * For fake objects, which have an object identifier, but no objects + * information block. + */ +typedef enum { + OBJECTS_FAKE_OBJECTS_NO_CLASS = 0, + OBJECTS_FAKE_OBJECTS_SCHEDULERS = 1 +} Objects_Fake_objects_API; + /** * This enumerated type lists the locations which may be returned * by _Objects_Get. These codes indicate the success of locating diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h index e088d26b88..01be51518e 100644 --- a/cpukit/score/include/rtems/score/schedulerimpl.h +++ b/cpukit/score/include/rtems/score/schedulerimpl.h @@ -451,6 +451,16 @@ RTEMS_INLINE_ROUTINE const Scheduler_Control *_Scheduler_Get( return &_Scheduler_Table[ 0 ]; } +RTEMS_INLINE_ROUTINE Objects_Id _Scheduler_Build_id( uint32_t scheduler_index ) +{ + return _Objects_Build_id( + OBJECTS_FAKE_OBJECTS_API, + OBJECTS_FAKE_OBJECTS_SCHEDULERS, + _Objects_Local_node, + scheduler_index + 1 + ); +} + /** @} */ #ifdef __cplusplus |