summaryrefslogtreecommitdiff
path: root/src/sched/sched_getaffinity.c
blob: 0aa4c65a67f02f74a41ba8ca1462014d4efe986b (plain)
1
2
3
4
5
6
7
8
9
10
#define _GNU_SOURCE
#include <sched.h>
#include "syscall.h"

int sched_getaffinity(pid_t tid, size_t size, cpu_set_t *set)
{
	long ret = __syscall(SYS_sched_getaffinity, tid, size, set);
	if (ret > 0) ret = 0;
	return __syscall_ret(ret);
}