From ccdf4c579fa4015de6155d511d9e8d56e5b30438 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 12 Aug 1996 18:05:47 +0000 Subject: pthread_mutex_getprioceiling: added error check for null old_ceiling pthread_mutex_setprioceiling: added comment indicating an error was impossible to generate. --- cpukit/posix/src/mutex.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cpukit/posix/src/mutex.c') diff --git a/cpukit/posix/src/mutex.c b/cpukit/posix/src/mutex.c index 92b03256d1..4b983eee36 100644 --- a/cpukit/posix/src/mutex.c +++ b/cpukit/posix/src/mutex.c @@ -591,6 +591,9 @@ int pthread_mutex_setprioceiling( Priority_Control the_priority; int status; + if ( !old_ceiling ) + return EINVAL; + if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; @@ -607,10 +610,9 @@ int pthread_mutex_setprioceiling( the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_ERROR: - return EINVAL; + return EINVAL; /* impossible to get here */ case OBJECTS_REMOTE: /* XXX It feels questionable to set the ceiling on a remote mutex. */ - return POSIX_MP_NOT_IMPLEMENTED(); return EINVAL; case OBJECTS_LOCAL: *old_ceiling = the_mutex->Mutex.Attributes.priority_ceiling; -- cgit v1.2.3