diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-01-05 22:19:21 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-01-05 22:19:21 +0000 |
commit | 5870ac55678115857215a4199f519263599ee341 (patch) | |
tree | 8b6f044ae7cccc3da9a3bd69b2468c2ca77acff8 /c/src/exec/score/src/coremutex.c | |
parent | Updated to reflect a time that had previously been left out due to (diff) | |
download | rtems-5870ac55678115857215a4199f519263599ee341.tar.bz2 |
Added support for simple binary semaphores in addition to the high
power binary/mutex style semaphores already supported by RTEMS. This
was done at the request of Eric Norum <eric@cls.usask.ca> in support
of his effort to port EPICS to RTEMS. This change consisted of
changing the nesting_allowed boolean into a lock_nesting_behavior
enumerated value as well as allowing the core mutex object to optionally
support ensuring that the holder of a binary semaphore released it.
Finally, a more subtle enhancement was to allow the non-holder to release
a priority inheritance/ceiling mutex and still allow the holding task
to return to its original priority.
Diffstat (limited to 'c/src/exec/score/src/coremutex.c')
-rw-r--r-- | c/src/exec/score/src/coremutex.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/c/src/exec/score/src/coremutex.c b/c/src/exec/score/src/coremutex.c index 2f5b4a6675..a5842efb91 100644 --- a/c/src/exec/score/src/coremutex.c +++ b/c/src/exec/score/src/coremutex.c @@ -55,7 +55,18 @@ void _CORE_mutex_Initialize( */ the_mutex->Attributes = *the_mutex_attributes; - the_mutex->lock = initial_lock; + the_mutex->lock = initial_lock; + +#if 0 + if ( !the_mutex_attributes->only_owner_release && + the_mutex_attributes->nesting_allowed ) { + _Internal_error_Occurred( + INTERNAL_ERROR_CORE, + TRUE, + INTERNAL_ERROR_BAD_ATTRIBUTES + ); + } +#endif if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; |