Index: qemu.bkp/linux-user/syscall.c =================================================================== --- qemu.bkp.orig/linux-user/syscall.c +++ qemu.bkp/linux-user/syscall.c @@ -149,6 +149,7 @@ type name (type1 arg1,type2 arg2,type3 a #define __NR_sys_syslog __NR_syslog #define __NR_sys_tgkill __NR_tgkill #define __NR_sys_clone __NR_clone +#define __NR_sys_sched_getaffinity __NR_sched_getaffinity #if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__) #define __NR__llseek __NR_lseek @@ -171,6 +172,7 @@ _syscall3(int,sys_rt_sigqueueinfo,int,pi _syscall3(int,sys_syslog,int,type,char*,bufp,int,len) _syscall3(int,sys_tgkill,int,tgid,int,pid,int,sig) _syscall5(int,sys_clone, int, flags, void *, child_stack, int *, parent_tidptr, void *, newtls, int *, child_tidptr) +_syscall3(int,sys_sched_getaffinity,pid_t,pid,unsigned int,cpusetsize,void*,mask) #ifdef __NR_exit_group _syscall1(int,exit_group,int,error_code) #endif @@ -4823,6 +4825,17 @@ long do_syscall(void *cpu_env, int num, goto unimplemented_nowarn; #endif +#ifdef TARGET_NR_sched_getaffinity + case TARGET_NR_sched_getaffinity: + { + cpu_set_t *mask; + lock_user_struct(mask, arg3, 1); + 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);