summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/exec/posix/src/pthread.c13
-rw-r--r--cpukit/posix/src/pthread.c13
2 files changed, 22 insertions, 4 deletions
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;
@@ -667,6 +668,14 @@ int pthread_create(
}
/*
+ * 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.
*/
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 41725a31e5..df85978ea6 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/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;
@@ -667,6 +668,14 @@ int pthread_create(
}
/*
+ * 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.
*/