2007-07-10 18:55:54 +02:00
|
|
|
Index: qemu.bkp/linux-user/syscall.c
|
2007-11-13 21:32:02 +01:00
|
|
|
================================================================================
|
|
|
|
--- qemu/linux-user/syscall.c
|
|
|
|
+++ qemu/linux-user/syscall.c
|
2008-07-25 04:42:31 +02:00
|
|
|
@@ -152,6 +152,7 @@
|
|
|
|
}
|
|
|
|
|
2007-07-10 18:55:54 +02:00
|
|
|
|
2008-07-25 04:42:31 +02:00
|
|
|
+#define __NR_sys_sched_getaffinity __NR_sched_getaffinity
|
|
|
|
#define __NR_sys_uname __NR_uname
|
|
|
|
#define __NR_sys_faccessat __NR_faccessat
|
|
|
|
#define __NR_sys_fchmodat __NR_fchmodat
|
|
|
|
@@ -242,6 +243,9 @@
|
|
|
|
#if defined(TARGET_NR_tkill) && defined(__NR_tkill)
|
|
|
|
_syscall2(int,sys_tkill,int,tid,int,sig)
|
2007-11-13 21:32:02 +01:00
|
|
|
#endif
|
|
|
|
+#ifdef __NR_sys_sched_getaffinity
|
2007-07-10 18:55:54 +02:00
|
|
|
+_syscall3(int,sys_sched_getaffinity,pid_t,pid,unsigned int,cpusetsize,void*,mask)
|
2007-11-13 21:32:02 +01:00
|
|
|
+#endif
|
2007-07-10 18:55:54 +02:00
|
|
|
#ifdef __NR_exit_group
|
|
|
|
_syscall1(int,exit_group,int,error_code)
|
|
|
|
#endif
|
2008-07-25 04:42:31 +02:00
|
|
|
@@ -5857,6 +5861,17 @@
|
|
|
|
break;
|
2007-07-10 18:55:54 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
+#ifdef TARGET_NR_sched_getaffinity
|
|
|
|
+ case TARGET_NR_sched_getaffinity:
|
|
|
|
+ {
|
|
|
|
+ cpu_set_t *mask;
|
2007-11-13 21:32:02 +01:00
|
|
|
+ lock_user_struct(VERIFY_READ, mask, arg3, 1);
|
2007-07-10 18:55:54 +02:00
|
|
|
+ ret = get_errno(sys_sched_getaffinity((pid_t)arg1, (unsigned int)arg2, mask));
|
|
|
|
+ unlock_user_struct(mask, arg3, 0);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
default:
|
|
|
|
unimplemented:
|
|
|
|
gemu_log("qemu: Unsupported syscall: %d\n", num);
|