diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-17 07:40:05 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-18 07:30:36 +0100 |
commit | 142628edcd9fc091ce02246a761d5d5100f22ca3 (patch) | |
tree | 5178ed9dbd302bf2ff9d352b4d93fd5e50e0fae9 /cpukit/score/include/rtems/score/threadqimpl.h | |
parent | score: Constify _MRSP_Get_owner() (diff) | |
download | rtems-142628edcd9fc091ce02246a761d5d5100f22ca3.tar.bz2 |
score: Optimize self-contained objects
Avoid use of the stack for the hot paths.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadqimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadqimpl.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h index e6c8f0576b..45f552a103 100644 --- a/cpukit/score/include/rtems/score/threadqimpl.h +++ b/cpukit/score/include/rtems/score/threadqimpl.h @@ -217,6 +217,25 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_add_priority_update( queue_context->Priority.update[ n ] = the_thread; } +#define _Thread_queue_Context_ISR_disable( queue_context, level ) \ + do { \ + _ISR_Local_disable( level ); \ + _ISR_lock_ISR_disable_profile( \ + &( queue_context )->Lock_context.Lock_context \ + ) \ + } while ( 0 ) + +RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_ISR_level( + Thread_queue_Context *queue_context, + ISR_Level level +) +{ + _ISR_lock_Context_set_level( + &queue_context->Lock_context.Lock_context, + level + ); +} + /** * @brief Sets the MP callout in the thread queue context. * |