mirror of
https://github.com/fluencelabs/musl
synced 2025-06-02 01:21:34 +00:00
linux's sched_* syscalls actually implement the TPS (thread scheduling) functionality, not the PS (process scheduling) functionality which the sched_* functions are supposed to have. omitting support for the PS option (and having the sched_* interfaces fail with ENOSYS rather than omitting them, since some broken software assumes they exist) seems to be the only conforming way to do this on linux.
14 lines
222 B
C
14 lines
222 B
C
#include "pthread_impl.h"
|
|
|
|
int pthread_attr_setscope(pthread_attr_t *a, int scope)
|
|
{
|
|
switch (scope) {
|
|
case PTHREAD_SCOPE_SYSTEM:
|
|
return 0;
|
|
case PTHREAD_SCOPE_PROCESS:
|
|
return ENOTSUP;
|
|
default:
|
|
return EINVAL;
|
|
}
|
|
}
|