2 ms·
The sched_* functions, as implemented by glibc, do not do what POSIX says they should. On linux, it is not possible to implement them in a way that is compliant
by rrss 7y ago
The sched_* functions, as implemented by glibc, do not do what POSIX says they should. On linux, it is not possible to implement them in a way that is compliant with the standard, so musl does not implement them. Given the principles specified in this webpage, that seems like a pretty reasonable thing to do.
musl does expose the extent of functionality provided by the kernel through the corresponding pthread scheduling functions.
> Who removes functionality that the kernel provides because in his opinion the kernel's design is wrong?
The kernel doesn't provide the necessary functionality. The functionality that the kernel does provide is still available in musl.
I can understand that this is probably frustrating (I'm sure I would be frustrated if I had to deal with it), but I can respect musl's decision not to have sched_* do the wrong thing.
- naasking 7y ago> I can respect musl's decision not to have sched_* do the wrong thing. Particularly because this actually ensures that programs linked to musl are 100% portable (modulo bugs), rather than introducing subtle platform incompatibilities due to slightly differing platform semantics.