From db6ec79e6c915500da0328ea1a9d685f752a6093 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 5 Jan 2000 18:30:09 +0000 Subject: Fixed recursive release for mutexes with nesting allowed. --- c/src/exec/score/src/coremutexsurrender.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'c') diff --git a/c/src/exec/score/src/coremutexsurrender.c b/c/src/exec/score/src/coremutexsurrender.c index 7f5fc2e911..447a5421e8 100644 --- a/c/src/exec/score/src/coremutexsurrender.c +++ b/c/src/exec/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; -- cgit v1.2.3