diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-31 19:01:26 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-31 19:01:26 +0000 |
commit | e72d995a80461203e99c812afc7e0b660ed341d7 (patch) | |
tree | 5c4a82abcc9572937906d87ef1885cd9ae6d1b0a /c/src/exec/posix/src/pthread.c | |
parent | commented out cancel handlers related items. (diff) | |
download | rtems-e72d995a80461203e99c812afc7e0b660ed341d7.tar.bz2 |
moved sleep() from psignal.c to unistd.c
implemented sigemptyset() sigfillset(), sigaddset(), sigdelset(), and
sigismember().
added checks for valid attribute values to some of the pthread_attr_t sets.
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/posix/src/pthread.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c index 4b8a4977d8..9fa1428282 100644 --- a/c/src/exec/posix/src/pthread.c +++ b/c/src/exec/posix/src/pthread.c @@ -222,6 +222,14 @@ int pthread_attr_setscope( if ( !attr || !attr->is_initialized ) return EINVAL; + switch ( contentionscope ) { + case PTHREAD_SCOPE_PROCESS: + case PTHREAD_SCOPE_SYSTEM: + break; + default: + return EINVAL; + } + attr->contentionscope = contentionscope; return 0; } @@ -256,6 +264,14 @@ int pthread_attr_setinheritsched( if ( !attr || !attr->is_initialized ) return EINVAL; + switch ( inheritsched ) { + case PTHREAD_INHERIT_SCHED: + case PTHREAD_EXPLICIT_SCHED: + break; + default: + return EINVAL; + } + attr->inheritsched = inheritsched; return 0; } @@ -569,6 +585,22 @@ int pthread_create( #endif /* + * P1003.1c/D10, p. 121. + * + * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread + * inherits scheduling attributes from the creating thread. If it is + * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the + * attributes structure. + */ + + switch ( attrp->inheritsched ) { + case PTHREAD_INHERIT_SCHED: + break; + case PTHREAD_EXPLICIT_SCHED: + break; + } + + /* * Validate the RTEMS API priority and convert it to the core priority range. */ |