blob: 760e4d5bd4dd08d9f6230978ac0bba05fdee1e61 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#define _GNU_SOURCE
#include <sched.h>
#include "syscall.h"
int sched_getcpu(void)
{
int r;
unsigned cpu;
r = __syscall(SYS_getcpu, &cpu, 0, 0);
if (!r) return cpu;
return __syscall_ret(r);
}
|