diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-09-02 11:58:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-09-04 13:25:03 +0200 |
commit | 3995e6d9c213515f0d636dc2f211bf3c0d997631 (patch) | |
tree | 7299f4b9c16d4d7987b6f9a0137778bdd93884b5 /cpukit/score/include/rtems/score/threadqimpl.h | |
parent | score: Documentation (diff) | |
download | rtems-3995e6d9c213515f0d636dc2f211bf3c0d997631.tar.bz2 |
score: Implement SMP-specific priority queue
Diffstat (limited to 'cpukit/score/include/rtems/score/threadqimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadqimpl.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h index 3828f415a6..bf01eb7404 100644 --- a/cpukit/score/include/rtems/score/threadqimpl.h +++ b/cpukit/score/include/rtems/score/threadqimpl.h @@ -22,6 +22,7 @@ #include <rtems/score/threadq.h> #include <rtems/score/chainimpl.h> #include <rtems/score/rbtreeimpl.h> +#include <rtems/score/scheduler.h> #include <rtems/score/thread.h> #ifdef __cplusplus @@ -51,6 +52,21 @@ typedef struct { #endif } Thread_queue_Syslock_queue; +RTEMS_INLINE_ROUTINE void _Thread_queue_Heads_initialize( + Thread_queue_Heads *heads +) +{ +#if defined(RTEMS_SMP) + size_t i; + + for ( i = 0; i < _Scheduler_Count; ++i ) { + _RBTree_Initialize_empty( &heads->Priority[ i ].Queue ); + } +#endif + + _Chain_Initialize_empty( &heads->Free_chain ); +} + RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_initialize( Thread_queue_Queue *queue ) |