From 2c207d1f846a36713735317fa789dcc3bf22cbb9 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 4 Jun 1996 20:36:37 +0000 Subject: make PTHREAD_SCOPE_SYSTEM an unsupported value for contentionscope. --- c/src/exec/posix/src/pthread.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'c/src/exec/posix/src/pthread.c') diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c index 41725a31e5..df85978ea6 100644 --- a/c/src/exec/posix/src/pthread.c +++ b/c/src/exec/posix/src/pthread.c @@ -226,10 +226,12 @@ int pthread_attr_setscope( switch ( contentionscope ) { case PTHREAD_SCOPE_PROCESS: - case PTHREAD_SCOPE_SYSTEM: attr->contentionscope = contentionscope; return 0; + case PTHREAD_SCOPE_SYSTEM: + return ENOSYS; + default: return EINVAL; } @@ -636,7 +638,6 @@ int pthread_create( */ #if 0 - int contentionscope; int schedpolicy; struct sched_param schedparam; @@ -666,6 +667,14 @@ int pthread_create( break; } + /* + * Check the contentionscope since rtems only supports PROCESS wide + * contention (i.e. no system wide contention). + */ + + if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) + return ENOSYS; + /* * Interpret the scheduling parameters. */ -- cgit v1.2.3