summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/inline
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-12 18:06:27 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-12 18:06:27 +0000
commitc7a9c6675e9d3c3a3224bbca8111eb46c3fcf966 (patch)
tree3004666a25ae8b50059305f8a3f0e34e9162598f /c/src/exec/posix/inline
parentpthread_mutex_getprioceiling: added error check for null old_ceiling (diff)
downloadrtems-c7a9c6675e9d3c3a3224bbca8111eb46c3fcf966.tar.bz2
_POSIX_Mutex_Get: made null id an error
Diffstat (limited to 'c/src/exec/posix/inline')
-rw-r--r--c/src/exec/posix/inline/mutex.inl5
-rw-r--r--c/src/exec/posix/inline/rtems/posix/mutex.inl5
2 files changed, 10 insertions, 0 deletions
diff --git a/c/src/exec/posix/inline/mutex.inl b/c/src/exec/posix/inline/mutex.inl
index ecbf039a45..baeb960858 100644
--- a/c/src/exec/posix/inline/mutex.inl
+++ b/c/src/exec/posix/inline/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.
diff --git a/c/src/exec/posix/inline/rtems/posix/mutex.inl b/c/src/exec/posix/inline/rtems/posix/mutex.inl
index ecbf039a45..baeb960858 100644
--- a/c/src/exec/posix/inline/rtems/posix/mutex.inl
+++ b/c/src/exec/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.