diff options
author | ru <ru@FreeBSD.org> | 2008-03-25 09:11:53 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2008-03-25 09:11:53 +0000 |
commit | 4feaeed265cdcf81445678e2f9468458e440cd5f (patch) | |
tree | 6648bfd3e3d0d414078c196b5faa15196cdf3f60 /sys/kern/kern_cpuset.c | |
parent | 59900e5206efb55f5382482d47a2f300d8a2b972 (diff) | |
download | FreeBSD-src-4feaeed265cdcf81445678e2f9468458e440cd5f.zip FreeBSD-src-4feaeed265cdcf81445678e2f9468458e440cd5f.tar.gz |
Fixed type of the fourth argument of cpuset_{get,set}affinity(2) to be size_t.
Prodded by: davidxu
Diffstat (limited to 'sys/kern/kern_cpuset.c')
-rw-r--r-- | sys/kern/kern_cpuset.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 0ccb33a..fe9bcb7 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 @@ out: #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 |