summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coremutexsurrender.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-05 18:30:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-05 18:30:09 +0000
commitdb6ec79e6c915500da0328ea1a9d685f752a6093 (patch)
tree218c9dba9b0a8a853b962cf5cb4da7009d8f3ea4 /cpukit/score/src/coremutexsurrender.c
parentNow print strings -- not error numbers. (diff)
downloadrtems-db6ec79e6c915500da0328ea1a9d685f752a6093.tar.bz2
Fixed recursive release for mutexes with nesting allowed.
Diffstat (limited to 'cpukit/score/src/coremutexsurrender.c')
-rw-r--r--cpukit/score/src/coremutexsurrender.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c
index 7f5fc2e911..447a5421e8 100644
--- a/cpukit/score/src/coremutexsurrender.c
+++ b/cpukit/score/src/coremutexsurrender.c
@@ -84,8 +84,11 @@ CORE_mutex_Status _CORE_mutex_Surrender(
the_mutex->nest_count--;
- if ( the_mutex->nest_count != 0 )
+ if ( the_mutex->nest_count != 0 ) {
+ if ( the_mutex->Attributes.allow_nesting )
+ return( CORE_MUTEX_STATUS_SUCCESSFUL );
return( CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED );
+ }
_Thread_Executing->resource_count--;
the_mutex->holder = NULL;