diff options
author | Mark Johannes <Mark.Johannes@OARcorp.com> | 1996-08-15 16:22:59 +0000 |
---|---|---|
committer | Mark Johannes <Mark.Johannes@OARcorp.com> | 1996-08-15 16:22:59 +0000 |
commit | 48e685ceae2d8300b78dde3f496345399fcc12f6 (patch) | |
tree | 8c38bd38636a6806383ebc01a8c7e3168189d656 /c/src/exec/posix/src/pthread.c | |
parent | pthread_mutex_init returns EAGAIN not ENOMEM when there are too many mutexes. (diff) | |
download | rtems-48e685ceae2d8300b78dde3f496345399fcc12f6.tar.bz2 |
fixed typo for NOTSUP -> ENOTSUP
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/posix/src/pthread.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c index 0f508af5a5..514f3464cb 100644 --- a/c/src/exec/posix/src/pthread.c +++ b/c/src/exec/posix/src/pthread.c @@ -363,8 +363,7 @@ int pthread_attr_setscope( return 0; case PTHREAD_SCOPE_SYSTEM: -/* XXX needs to be ENOTSUP */ - return ENOSYS; + return ENOTSUP; default: return EINVAL; @@ -381,7 +380,7 @@ int pthread_attr_getscope( int *contentionscope ) { - if ( !attr || !attr->is_initialized ) + if ( !attr || !attr->is_initialized || !contentionscope ) return EINVAL; *contentionscope = attr->contentionscope; @@ -408,7 +407,7 @@ int pthread_attr_setinheritsched( return 0; default: - return EINVAL; + return ENOTSUP; } } @@ -422,7 +421,7 @@ int pthread_attr_getinheritsched( int *inheritsched ) { - if ( !attr || !attr->is_initialized ) + if ( !attr || !attr->is_initialized || !inheritsched ) return EINVAL; *inheritsched = attr->inheritsched; @@ -451,7 +450,7 @@ int pthread_attr_setschedpolicy( return 0; default: - return EINVAL; + return ENOTSUP; } } @@ -465,7 +464,7 @@ int pthread_attr_getschedpolicy( int *policy ) { - if ( !attr || !attr->is_initialized ) + if ( !attr || !attr->is_initialized || !policy ) return EINVAL; *policy = attr->schedpolicy; @@ -691,7 +690,7 @@ int pthread_attr_getstacksize( size_t *stacksize ) { - if ( !attr || !attr->is_initialized ) + if ( !attr || !attr->is_initialized || !stacksize ) return EINVAL; *stacksize = attr->stacksize; @@ -728,7 +727,7 @@ int pthread_attr_getstackaddr( void **stackaddr ) { - if ( !attr || !attr->is_initialized ) + if ( !attr || !attr->is_initialized || !stackaddr ) return EINVAL; *stackaddr = attr->stackaddr; @@ -762,7 +761,7 @@ int pthread_attr_getdetachstate( int *detachstate ) { - if ( !attr || !attr->is_initialized ) + if ( !attr || !attr->is_initialized || !detachstate ) return EINVAL; *detachstate = attr->detachstate; @@ -866,7 +865,7 @@ int pthread_create( */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) - return ENOSYS; + return ENOTSUP; /* * Interpret the scheduling parameters. @@ -961,7 +960,7 @@ int pthread_create( if ( !status ) { _POSIX_Threads_Free( the_thread ); _Thread_Enable_dispatch(); - return EINVAL; + return EAGAIN; } /* @@ -1275,7 +1274,7 @@ int pthread_attr_getcputime( int *clock_allowed ) { - if ( !attr || !attr->is_initialized ) + if ( !attr || !attr->is_initialized || !clock_allowed ) return EINVAL; *clock_allowed = attr->cputime_clock_allowed; |