add support for thread scheduling (POSIX TPS option)
authorRich Felker <dalias@aerifal.cx>
Sun, 11 Nov 2012 20:38:04 +0000 (15:38 -0500)
committerRich Felker <dalias@aerifal.cx>
Sun, 11 Nov 2012 20:38:04 +0000 (15:38 -0500)
commit1e21e78bf7a5c24c217446d8760be7b7188711c2
tree83920f2f5aad8bc090ddb55e57f74e062743e592
parente9b885ee550e8a3eabc9d11c469baf1cfaf64f55
add support for thread scheduling (POSIX TPS option)

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.
23 files changed:
include/pthread.h
include/sched.h
include/spawn.h
src/internal/pthread_impl.h
src/process/posix_spawnattr_sched.c [new file with mode: 0644]
src/sched/sched_get_priority_max.c
src/sched/sched_getparam.c
src/sched/sched_getscheduler.c
src/sched/sched_rr_get_interval.c
src/sched/sched_setparam.c
src/sched/sched_setscheduler.c
src/thread/pthread_attr_getinheritsched.c [new file with mode: 0644]
src/thread/pthread_attr_getschedparam.c
src/thread/pthread_attr_getschedpolicy.c [new file with mode: 0644]
src/thread/pthread_attr_getscope.c
src/thread/pthread_attr_setinheritsched.c [new file with mode: 0644]
src/thread/pthread_attr_setschedparam.c
src/thread/pthread_attr_setschedpolicy.c [new file with mode: 0644]
src/thread/pthread_attr_setscope.c
src/thread/pthread_create.c
src/thread/pthread_getschedparam.c [new file with mode: 0644]
src/thread/pthread_setschedparam.c [new file with mode: 0644]
src/thread/pthread_setschedprio.c [new file with mode: 0644]