merge newfstat variants
[trinity.git] / syscalls / sched_getattr.c
blobe04338341a5e02ca1c1430481e5eaa87d5f8a0b5
1 /*
2 * SYSCALL_DEFINE3(sched_getattr, pid_t, pid, struct sched_attr __user *, uattr, unsigned int, size)
3 */
4 #include <stdlib.h>
5 #include "arch.h"
6 #include "sanitise.h"
7 #include "shm.h"
9 #define SCHED_ATTR_SIZE_VER0 48
11 static void sanitise_sched_getattr(int childno)
13 unsigned long range = page_size - SCHED_ATTR_SIZE_VER0;
15 shm->a3[childno] = (rand() % range) + SCHED_ATTR_SIZE_VER0;
18 struct syscallentry syscall_sched_getattr = {
19 .name = "sched_getattr",
20 .num_args = 3,
21 .arg1name = "pid",
22 .arg1type = ARG_PID,
23 .arg2name = "param",
24 .arg2type = ARG_ADDRESS,
25 .arg3name = "size",
26 .sanitise = sanitise_sched_getattr,