Logo
Explore Help
Sign In
fluencelabs/musl
1
0
Fork 0
You've already forked musl
mirror of https://github.com/fluencelabs/musl synced 2025-06-28 06:02:04 +00:00
Code Issues Projects Releases Wiki Activity
Files
64e32287f9d8a84217834bcc3387e9431cad9e4c
musl/src/thread/pthread_setschedprio.c

11 lines
214 B
C
Raw Normal View History

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.
2012-11-11 15:38:04 -05:00
#include "pthread_impl.h"
int pthread_setschedprio(pthread_t t, int prio)
{
int r;
__lock(t->killlock);
r = t->dead ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, &prio);
__unlock(t->killlock);
return r;
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 254ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API