diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-20 08:45:41 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-21 08:25:31 +0200 |
commit | 4db0ae8e07870d4ca23dc1b9f8097e3494fe82a2 (patch) | |
tree | e7ba3533960b935b67b152198bba713b1c4ebed2 /cpukit/score/include/rtems/score/coresemimpl.h | |
parent | score: Add _ISR_lock_ISR_disable/enable() (diff) | |
download | rtems-4db0ae8e07870d4ca23dc1b9f8097e3494fe82a2.tar.bz2 |
score: _Objects_Get_isr_disable()
Use ISR_lock_Context instead of ISR_Level to allow use of ISR locks for
low-level locking.
Update #2273.
Diffstat (limited to 'cpukit/score/include/rtems/score/coresemimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/coresemimpl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/score/include/rtems/score/coresemimpl.h b/cpukit/score/include/rtems/score/coresemimpl.h index fda908ec83..99303d7aa3 100644 --- a/cpukit/score/include/rtems/score/coresemimpl.h +++ b/cpukit/score/include/rtems/score/coresemimpl.h @@ -203,7 +203,7 @@ RTEMS_INLINE_ROUTINE uint32_t _CORE_semaphore_Get_count( * @param[in] id is the Id of the owning API level Semaphore object * @param[in] wait is true if the thread is willing to wait * @param[in] timeout is the maximum number of ticks to block - * @param[in] level is a temporary variable used to contain the ISR + * @param[in] lock_context is a temporary variable used to contain the ISR * disable level cookie * * @note There is currently no MACRO version of this routine. @@ -214,7 +214,7 @@ RTEMS_INLINE_ROUTINE void _CORE_semaphore_Seize_isr_disable( Objects_Id id, bool wait, Watchdog_Interval timeout, - ISR_Level level + ISR_lock_Context *lock_context ) { /* disabled when you get here */ @@ -222,12 +222,12 @@ RTEMS_INLINE_ROUTINE void _CORE_semaphore_Seize_isr_disable( executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; - _ISR_Enable( level ); + _ISR_lock_ISR_enable( lock_context ); return; } if ( !wait ) { - _ISR_Enable( level ); + _ISR_lock_ISR_enable( lock_context ); executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; return; } @@ -236,7 +236,7 @@ RTEMS_INLINE_ROUTINE void _CORE_semaphore_Seize_isr_disable( _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; - _ISR_Enable( level ); + _ISR_lock_ISR_enable( lock_context ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, executing, timeout ); _Thread_Enable_dispatch(); |