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/posix | |
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/posix')
-rw-r--r-- | cpukit/posix/include/rtems/posix/muteximpl.h | 2 | ||||
-rw-r--r-- | cpukit/posix/src/mutexget.c | 4 | ||||
-rw-r--r-- | cpukit/posix/src/mutexlocksupp.c | 10 |
3 files changed, 10 insertions, 6 deletions
diff --git a/cpukit/posix/include/rtems/posix/muteximpl.h b/cpukit/posix/include/rtems/posix/muteximpl.h index e5955a6fdd..821961c0f4 100644 --- a/cpukit/posix/include/rtems/posix/muteximpl.h +++ b/cpukit/posix/include/rtems/posix/muteximpl.h @@ -148,7 +148,7 @@ POSIX_Mutex_Control *_POSIX_Mutex_Get ( POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, - ISR_Level *level + ISR_lock_Context *lock_context ); #ifdef __cplusplus diff --git a/cpukit/posix/src/mutexget.c b/cpukit/posix/src/mutexget.c index 41a5495fa2..5c0cc4264d 100644 --- a/cpukit/posix/src/mutexget.c +++ b/cpukit/posix/src/mutexget.c @@ -71,7 +71,7 @@ POSIX_Mutex_Control *_POSIX_Mutex_Get ( POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, - ISR_Level *level + ISR_lock_Context *lock_context ) { if ( !_POSIX_Mutex_Check_id_and_auto_init( mutex, location ) ) { @@ -82,6 +82,6 @@ POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, - level + lock_context ); } diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c index 99d6454925..3678a0b942 100644 --- a/cpukit/posix/src/mutexlocksupp.c +++ b/cpukit/posix/src/mutexlocksupp.c @@ -43,10 +43,14 @@ int _POSIX_Mutex_Lock_support( { POSIX_Mutex_Control *the_mutex; Objects_Locations location; - ISR_Level level; + ISR_lock_Context lock_context; Thread_Control *executing; - the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); + the_mutex = _POSIX_Mutex_Get_interrupt_disable( + mutex, + &location, + &lock_context + ); switch ( location ) { case OBJECTS_LOCAL: @@ -57,7 +61,7 @@ int _POSIX_Mutex_Lock_support( the_mutex->Object.id, blocking, timeout, - level + &lock_context ); _Objects_Put_for_get_isr_disable( &the_mutex->Object ); return _POSIX_Mutex_Translate_core_mutex_return_code( |