diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 0ccb33a8a519..fe9bcb76cdd6 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -772,11 +772,11 @@ cpuset_getid(struct thread *td, struct cpuset_getid_args *uap) #ifndef _SYS_SYSPROTO_H_ struct cpuset_getaffinity_args { - cpulevel_t level; - cpuwhich_t which; - int id; - int cpusetsize; - long *mask; + cpulevel_t level; + cpuwhich_t which; + id_t id; + size_t cpusetsize; + cpuset_t *mask; }; #endif int @@ -788,7 +788,7 @@ cpuset_getaffinity(struct thread *td, struct cpuset_getaffinity_args *uap) struct proc *p; cpuset_t *mask; int error; - int size; + size_t size; if (uap->cpusetsize < sizeof(cpuset_t) || uap->cpusetsize * NBBY > CPU_MAXSIZE) @@ -798,7 +798,6 @@ cpuset_getaffinity(struct thread *td, struct cpuset_getaffinity_args *uap) error = cpuset_which(uap->which, uap->id, &p, &ttd, &set); if (error) goto out; - error = 0; switch (uap->level) { case CPU_LEVEL_ROOT: case CPU_LEVEL_CPUSET: @@ -856,10 +855,10 @@ cpuset_getaffinity(struct thread *td, struct cpuset_getaffinity_args *uap) #ifndef _SYS_SYSPROTO_H_ struct cpuset_setaffinity_args { cpulevel_t level; - cpuwhich_t which; - int id; - int cpusetsize; - long * mask; + cpuwhich_t which; + id_t id; + size_t cpusetsize; + const cpuset_t *mask; }; #endif int diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh index 6a0967d4368b..e8722abd0767 100644 --- a/sys/kern/makesyscalls.sh +++ b/sys/kern/makesyscalls.sh @@ -132,6 +132,7 @@ s/\$//g printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n" > sysarg printf "#include \n" > sysarg + printf "#include \n" > sysarg printf "#include \n" > sysarg printf "#include \n\n" > sysarg printf "#include \n\n" > sysarg @@ -488,7 +489,6 @@ s/\$//g if (ncompat != 0 || ncompat4 != 0 || ncompat6 != 0) printf "#include \"opt_compat.h\"\n\n" > syssw - printf "#include \\n" > syssw if (ncompat != 0) { printf "\n#ifdef %s\n", compat > sysinc diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 59ef46eb772e..508feaad271b 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -852,11 +852,11 @@ cpuwhich_t which, id_t id, \ cpusetid_t *setid); } 487 AUE_NULL STD { int cpuset_getaffinity(cpulevel_t level, \ - cpuwhich_t which, id_t id, int cpusetsize, \ - long *mask); } + cpuwhich_t which, id_t id, size_t cpusetsize, \ + cpuset_t *mask); } 488 AUE_NULL STD { int cpuset_setaffinity(cpulevel_t level, \ - cpuwhich_t which, id_t id, int cpusetsize, \ - long *mask); } + cpuwhich_t which, id_t id, size_t cpusetsize, \ + const cpuset_t *mask); } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master diff --git a/sys/sys/cpuset.h b/sys/sys/cpuset.h index 4188dd473fee..d4634f0c1884 100644 --- a/sys/sys/cpuset.h +++ b/sys/sys/cpuset.h @@ -161,8 +161,8 @@ __BEGIN_DECLS int cpuset(cpusetid_t *); int cpuset_setid(cpuwhich_t, id_t, cpusetid_t); int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *); -int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, int, cpuset_t *); -int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, int, const cpuset_t *); +int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, cpuset_t *); +int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, const cpuset_t *); __END_DECLS #endif #endif /* !_SYS_CPUSET_H_ */