var scope reduction
[trinity.git] / syscalls / sched_getattr.c
blob192c9f6c7e13955ee2e968983117536fcb551d95
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->syscall[childno].a3 = (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,