diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-12 18:05:47 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-12 18:05:47 +0000 |
commit | ccdf4c579fa4015de6155d511d9e8d56e5b30438 (patch) | |
tree | 279b5e8a3eab5baf34ffed2a90aca051c8cdce67 /cpukit/posix/src/mutex.c | |
parent | added numerous error test cases. (diff) | |
download | rtems-ccdf4c579fa4015de6155d511d9e8d56e5b30438.tar.bz2 |
pthread_mutex_getprioceiling: added error check for null old_ceiling
pthread_mutex_setprioceiling: added comment indicating an error was
impossible to generate.
Diffstat (limited to 'cpukit/posix/src/mutex.c')
-rw-r--r-- | cpukit/posix/src/mutex.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; |