mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
199 B
14 lines
199 B
|
10 years ago
|
#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);
|
||
|
|
}
|