_POSIX_Mutex_Get: made null id an error

This commit is contained in:
Joel Sherrill
1996-08-12 18:06:27 +00:00
parent ccdf4c579f
commit c7a9c6675e
3 changed files with 15 additions and 0 deletions

View File

@@ -51,6 +51,11 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
{
int status;
if ( !id ) {
*location = OBJECTS_ERROR;
return (POSIX_Mutex_Control *) 0;
}
if ( *id == PTHREAD_MUTEX_INITIALIZER ) {
/*
* Do an "auto-create" here.

View File

@@ -51,6 +51,11 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
{
int status;
if ( !id ) {
*location = OBJECTS_ERROR;
return (POSIX_Mutex_Control *) 0;
}
if ( *id == PTHREAD_MUTEX_INITIALIZER ) {
/*
* Do an "auto-create" here.

View File

@@ -51,6 +51,11 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
{
int status;
if ( !id ) {
*location = OBJECTS_ERROR;
return (POSIX_Mutex_Control *) 0;
}
if ( *id == PTHREAD_MUTEX_INITIALIZER ) {
/*
* Do an "auto-create" here.