From ee42943cd03e0f64319f90444d0c1d0c71e07089 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 3 Nov 2016 14:44:15 +0100 Subject: score: Optimize self-contained mutexes --- cpukit/score/include/rtems/score/isrlock.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'cpukit/score/include/rtems/score/isrlock.h') diff --git a/cpukit/score/include/rtems/score/isrlock.h b/cpukit/score/include/rtems/score/isrlock.h index 5eb6a46c43..7dd2f29000 100644 --- a/cpukit/score/include/rtems/score/isrlock.h +++ b/cpukit/score/include/rtems/score/isrlock.h @@ -150,6 +150,24 @@ typedef struct { { } #endif +/** + * @brief Sets the ISR level in the ISR lock context. + * + * @param[in] context The ISR lock context. + * @param[in] level The ISR level. + */ +RTEMS_INLINE_ROUTINE void _ISR_lock_Context_set_level( + ISR_lock_Context *context, + ISR_Level level +) +{ +#if defined( RTEMS_SMP ) + context->Lock_context.isr_level = level; +#else + context->isr_level = level; +#endif +} + /** * @brief Initializes an ISR lock. * -- cgit v1.2.3