pthread_setschedparam.c 258 字节
Newer Older
1 2 3 4 5
#include "pthread_impl.h"

int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param)
{
	int r;
6
	LOCK(t->killlock);
7
	r = t->dead ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param);
8
	UNLOCK(t->killlock);
9 10
	return r;
}