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/rtems/src/semobtain.c | |
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/rtems/src/semobtain.c')
-rw-r--r-- | cpukit/rtems/src/semobtain.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c index 3608a00053..152274ea0a 100644 --- a/cpukit/rtems/src/semobtain.c +++ b/cpukit/rtems/src/semobtain.c @@ -39,12 +39,16 @@ rtems_status_code rtems_semaphore_obtain( { Semaphore_Control *the_semaphore; Objects_Locations location; - ISR_Level level; + ISR_lock_Context lock_context; Thread_Control *executing; rtems_attribute attribute_set; bool wait; - the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); + the_semaphore = _Semaphore_Get_interrupt_disable( + id, + &location, + &lock_context + ); switch ( location ) { case OBJECTS_LOCAL: @@ -55,7 +59,7 @@ rtems_status_code rtems_semaphore_obtain( if ( _Attributes_Is_multiprocessor_resource_sharing( attribute_set ) ) { MRSP_Status mrsp_status; - _ISR_Enable( level ); + _ISR_lock_ISR_enable( &lock_context ); mrsp_status = _MRSP_Obtain( &the_semaphore->Core_control.mrsp, executing, @@ -73,7 +77,7 @@ rtems_status_code rtems_semaphore_obtain( id, wait, timeout, - level + &lock_context ); _Objects_Put_for_get_isr_disable( &the_semaphore->Object ); return _Semaphore_Translate_core_mutex_return_code( @@ -87,7 +91,7 @@ rtems_status_code rtems_semaphore_obtain( id, wait, timeout, - level + &lock_context ); _Objects_Put_for_get_isr_disable( &the_semaphore->Object ); return _Semaphore_Translate_core_semaphore_return_code( |