Fixed type of the fourth argument of cpuset_{get,set}affinity(2) to be size_t.
Prodded by: davidxu
This commit is contained in:
parent
fa0c2b3474
commit
7f64829a5e
@ -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
|
||||
|
@ -132,6 +132,7 @@ s/\$//g
|
||||
printf "#define\t%s\n\n", sysproto_h > sysarg
|
||||
printf "#include <sys/signal.h>\n" > sysarg
|
||||
printf "#include <sys/acl.h>\n" > sysarg
|
||||
printf "#include <sys/cpuset.h>\n" > sysarg
|
||||
printf "#include <sys/_semaphore.h>\n" > sysarg
|
||||
printf "#include <sys/ucontext.h>\n\n" > sysarg
|
||||
printf "#include <bsm/audit_kevents.h>\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 \<bsm/audit_kevents.h\>\n" > syssw
|
||||
|
||||
if (ncompat != 0) {
|
||||
printf "\n#ifdef %s\n", compat > sysinc
|
||||
|
@ -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
|
||||
|
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user