pthread_mutex_getprioceiling: added error check for null old_ceiling

pthread_mutex_setprioceiling: added comment indicating an error was
impossible to generate.
This commit is contained in:
Joel Sherrill
1996-08-12 18:05:47 +00:00
parent d06e9ca36a
commit ccdf4c579f
2 changed files with 8 additions and 4 deletions

View File

@@ -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;