Fixed type of the fourth argument of cpuset_{get,set}affinity(2) to be size_t.

Prodded by:	davidxu
This commit is contained in:
Ruslan Ermilov 2008-03-25 09:11:53 +00:00
parent fa0c2b3474
commit 7f64829a5e
4 changed files with 17 additions and 18 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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_ */