summaryrefslogtreecommitdiff
path: root/src/thread/pthread_attr_setscope.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_attr_setscope.c')
-rw-r--r--src/thread/pthread_attr_setscope.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/thread/pthread_attr_setscope.c b/src/thread/pthread_attr_setscope.c
index d56ee391..46b520c0 100644
--- a/src/thread/pthread_attr_setscope.c
+++ b/src/thread/pthread_attr_setscope.c
@@ -2,6 +2,12 @@
int pthread_attr_setscope(pthread_attr_t *a, int scope)
{
- if (scope > 1U) return EINVAL;
- return 0;
+ switch (scope) {
+ case PTHREAD_SCOPE_SYSTEM:
+ return 0;
+ case PTHREAD_SCOPE_PROCESS:
+ return ENOTSUP;
+ default:
+ return EINVAL;
+ }
}