diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-12 18:06:27 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-12 18:06:27 +0000 |
commit | c7a9c6675e9d3c3a3224bbca8111eb46c3fcf966 (patch) | |
tree | 3004666a25ae8b50059305f8a3f0e34e9162598f /cpukit/posix/inline/rtems | |
parent | pthread_mutex_getprioceiling: added error check for null old_ceiling (diff) | |
download | rtems-c7a9c6675e9d3c3a3224bbca8111eb46c3fcf966.tar.bz2 |
_POSIX_Mutex_Get: made null id an error
Diffstat (limited to 'cpukit/posix/inline/rtems')
-rw-r--r-- | cpukit/posix/inline/rtems/posix/mutex.inl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpukit/posix/inline/rtems/posix/mutex.inl b/cpukit/posix/inline/rtems/posix/mutex.inl index ecbf039a45..baeb960858 100644 --- a/cpukit/posix/inline/rtems/posix/mutex.inl +++ b/cpukit/posix/inline/rtems/posix/mutex.inl @@ -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. |