summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-06-29 02:00:02 +0000
committeralfred <alfred@FreeBSD.org>2002-06-29 02:00:02 +0000
commit97873dcbf33019727d6c29b9a62702011576b3b2 (patch)
treed16723d40cb39c9fa11d51111834190de4a5c67d
parentd77580640ef94a74cf0f632a05f7023f4e2ccf16 (diff)
downloadFreeBSD-src-97873dcbf33019727d6c29b9a62702011576b3b2.zip
FreeBSD-src-97873dcbf33019727d6c29b9a62702011576b3b2.tar.gz
more caddr_t removal.
-rw-r--r--sys/kern/kern_resource.c13
-rw-r--r--sys/kern/kern_sig.c8
-rw-r--r--sys/kern/kern_synch.c8
-rw-r--r--sys/kern/kern_sysctl.c3
-rw-r--r--sys/kern/kern_time.c16
-rw-r--r--sys/kern/kern_xxx.c4
-rw-r--r--sys/kern/subr_disklabel.c2
-rw-r--r--sys/kern/subr_log.c3
-rw-r--r--sys/kern/subr_prof.c4
9 files changed, 26 insertions, 35 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index d467c1a..e8dad57 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -426,8 +426,7 @@ osetrlimit(td, uap)
struct rlimit lim;
int error;
- if ((error =
- copyin((caddr_t)uap->rlp, (caddr_t)&olim, sizeof(struct orlimit))))
+ if ((error = copyin(uap->rlp, &olim, sizeof(struct orlimit))))
return (error);
lim.rlim_cur = olim.rlim_cur;
lim.rlim_max = olim.rlim_max;
@@ -465,7 +464,7 @@ ogetrlimit(td, uap)
olim.rlim_max = p->p_rlimit[uap->which].rlim_max;
if (olim.rlim_max == -1)
olim.rlim_max = 0x7fffffff;
- error = copyout((caddr_t)&olim, (caddr_t)uap->rlp, sizeof(olim));
+ error = copyout(&olim, uap->rlp, sizeof(olim));
mtx_unlock(&Giant);
return (error);
}
@@ -489,8 +488,7 @@ setrlimit(td, uap)
struct rlimit alim;
int error;
- if ((error =
- copyin((caddr_t)uap->rlp, (caddr_t)&alim, sizeof (struct rlimit))))
+ if ((error = copyin(uap->rlp, &alim, sizeof (struct rlimit))))
return (error);
mtx_lock(&Giant);
error = dosetrlimit(td, uap->which, &alim);
@@ -625,7 +623,7 @@ getrlimit(td, uap)
if (uap->which >= RLIM_NLIMITS)
return (EINVAL);
mtx_lock(&Giant);
- error = copyout((caddr_t)&p->p_rlimit[uap->which], (caddr_t)uap->rlp,
+ error = copyout(&p->p_rlimit[uap->which], uap->rlp,
sizeof (struct rlimit));
mtx_unlock(&Giant);
return(error);
@@ -779,8 +777,7 @@ getrusage(td, uap)
}
mtx_unlock(&Giant);
if (error == 0) {
- error = copyout((caddr_t)rup, (caddr_t)uap->rusage,
- sizeof (struct rusage));
+ error = copyout(rup, uap->rusage, sizeof (struct rusage));
}
return(error);
}
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 8af0280..a561a19 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -829,7 +829,7 @@ sigsuspend(td, uap)
SIG_CANTMASK(mask);
p->p_sigmask = mask;
signotify(p);
- while (msleep((caddr_t) ps, &p->p_mtx, PPAUSE|PCATCH, "pause", 0) == 0)
+ while (msleep(ps, &p->p_mtx, PPAUSE|PCATCH, "pause", 0) == 0)
/* void */;
PROC_UNLOCK(p);
mtx_unlock(&Giant);
@@ -865,7 +865,7 @@ osigsuspend(td, uap)
SIG_CANTMASK(mask);
SIGSETLO(p->p_sigmask, mask);
signotify(p);
- while (msleep((caddr_t) ps, &p->p_mtx, PPAUSE|PCATCH, "opause", 0) == 0)
+ while (msleep(ps, &p->p_mtx, PPAUSE|PCATCH, "opause", 0) == 0)
/* void */;
PROC_UNLOCK(p);
mtx_unlock(&Giant);
@@ -1435,7 +1435,7 @@ psignal(p, sig)
}
} else {
p->p_flag |= P_CONTINUED;
- wakeup((caddr_t)p->p_pptr);
+ wakeup(p->p_pptr);
if (td->td_wchan == NULL)
goto run;
p->p_stat = SSLEEP;
@@ -1708,7 +1708,7 @@ stop(p)
mtx_assert(&sched_lock, MA_OWNED);
p->p_stat = SSTOP;
p->p_flag &= ~P_WAITED;
- wakeup((caddr_t)p->p_pptr);
+ wakeup(p->p_pptr);
}
/*
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 6f9adad..bd1a625 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -342,7 +342,7 @@ schedcpu(arg)
mtx_unlock_spin(&sched_lock);
} /* end of process loop */
sx_sunlock(&allproc_lock);
- wakeup((caddr_t)&lbolt);
+ wakeup(&lbolt);
callout_reset(&schedcpu_callout, hz, schedcpu, NULL);
}
@@ -632,7 +632,7 @@ restart:
maybe_resched(td);
} else {
p->p_sflag |= PS_SWAPINREQ;
- wakeup((caddr_t)&proc0);
+ wakeup(&proc0);
}
/* END INLINE EXPANSION */
goto restart;
@@ -680,7 +680,7 @@ restart:
break;
} else {
p->p_sflag |= PS_SWAPINREQ;
- wakeup((caddr_t)&proc0);
+ wakeup(&proc0);
}
/* END INLINE EXPANSION */
goto restart;
@@ -819,7 +819,7 @@ setrunnable(struct thread *td)
td->td_kse->ke_slptime = 0;
if ((p->p_sflag & PS_INMEM) == 0) {
p->p_sflag |= PS_SWAPINREQ;
- wakeup((caddr_t)&proc0);
+ wakeup(&proc0);
} else {
setrunqueue(td);
maybe_resched(td);
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 6943bc5..f89aa00 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1412,8 +1412,7 @@ ogetkerninfo(struct thread *td, struct getkerninfo_args *uap)
if (error == 0) {
td->td_retval[0] = needed ? needed : size;
if (uap->size) {
- error = copyout((caddr_t)&size, (caddr_t)uap->size,
- sizeof(size));
+ error = copyout(&size, uap->size, sizeof(size));
}
}
mtx_unlock(&Giant);
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index 645170e..5824213 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -333,12 +333,11 @@ gettimeofday(td, uap)
if (uap->tp) {
microtime(&atv);
- error = copyout((caddr_t)&atv, (caddr_t)uap->tp, sizeof (atv));
+ error = copyout(&atv, uap->tp, sizeof (atv));
}
if (error == 0 && uap->tzp != NULL) {
mtx_lock(&Giant);
- error = copyout((caddr_t)&tz, (caddr_t)uap->tzp,
- sizeof (tz));
+ error = copyout(&tz, uap->tzp, sizeof (tz));
mtx_unlock(&Giant);
}
return (error);
@@ -367,14 +366,13 @@ settimeofday(td, uap)
return (error);
/* Verify all parameters before changing time. */
if (uap->tv) {
- if ((error = copyin((caddr_t)uap->tv, (caddr_t)&atv,
- sizeof(atv))))
+ if ((error = copyin(uap->tv, &atv, sizeof(atv))))
return (error);
if (atv.tv_usec < 0 || atv.tv_usec >= 1000000)
return (EINVAL);
}
if (uap->tzp &&
- (error = copyin((caddr_t)uap->tzp, (caddr_t)&atz, sizeof(atz))))
+ (error = copyin(uap->tzp, &atz, sizeof(atz))))
return (error);
if (uap->tv && (error = settime(td, &atv)))
@@ -453,8 +451,7 @@ getitimer(td, uap)
aitv = p->p_stats->p_timer[uap->which];
}
splx(s);
- error = copyout((caddr_t)&aitv, (caddr_t)uap->itv,
- sizeof (struct itimerval));
+ error = copyout(&aitv, uap->itv, sizeof (struct itimerval));
mtx_unlock(&Giant);
return(error);
}
@@ -483,8 +480,7 @@ setitimer(td, uap)
if (uap->which > ITIMER_PROF)
return (EINVAL);
itvp = uap->itv;
- if (itvp && (error = copyin((caddr_t)itvp, (caddr_t)&aitv,
- sizeof(struct itimerval))))
+ if (itvp && (error = copyin(itvp, &aitv, sizeof(struct itimerval))))
return (error);
mtx_lock(&Giant);
diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c
index 9d4136b..3c95b78 100644
--- a/sys/kern/kern_xxx.c
+++ b/sys/kern/kern_xxx.c
@@ -274,7 +274,7 @@ getdomainname(td, uap)
domainnamelen = strlen(domainname) + 1;
if ((u_int)uap->len > domainnamelen + 1)
uap->len = domainnamelen + 1;
- error = copyout((caddr_t)domainname, (caddr_t)uap->domainname, uap->len);
+ error = copyout(domainname, uap->domainname, uap->len);
mtx_unlock(&Giant);
return (error);
}
@@ -305,7 +305,7 @@ setdomainname(td, uap)
goto done2;
}
domainnamelen = uap->len;
- error = copyin((caddr_t)uap->domainname, domainname, uap->len);
+ error = copyin(uap->domainname, domainname, uap->len);
domainname[domainnamelen] = 0;
done2:
mtx_unlock(&Giant);
diff --git a/sys/kern/subr_disklabel.c b/sys/kern/subr_disklabel.c
index e149687..e10bc61 100644
--- a/sys/kern/subr_disklabel.c
+++ b/sys/kern/subr_disklabel.c
@@ -98,7 +98,7 @@ bioqdisksort(bioq, bp)
break;
if (bn != NULL) {
mtx_lock(&dksort_mtx);
- msleep((caddr_t)&dksort_mtx, &dksort_mtx,
+ msleep(&dksort_mtx, &dksort_mtx,
PPAUSE | PCATCH | PDROP, "ioslow",
td->td_ksegrp->kg_nice);
}
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index 2c01568..0198557 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -138,8 +138,7 @@ logread(dev_t dev, struct uio *uio, int flag)
return (EWOULDBLOCK);
}
logsoftc.sc_state |= LOG_RDWAIT;
- if ((error = tsleep((caddr_t)mbp, LOG_RDPRI | PCATCH,
- "klog", 0))) {
+ if ((error = tsleep(mbp, LOG_RDPRI | PCATCH, "klog", 0))) {
splx(s);
return (error);
}
diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c
index 706863d..725a44c 100644
--- a/sys/kern/subr_prof.c
+++ b/sys/kern/subr_prof.c
@@ -522,9 +522,9 @@ addupc_task(ke, pc, ticks)
return;
addr = prof->pr_base + i;
- if (copyin(addr, (caddr_t)&v, sizeof(v)) == 0) {
+ if (copyin(addr, &v, sizeof(v)) == 0) {
v += ticks;
- if (copyout((caddr_t)&v, addr, sizeof(v)) == 0)
+ if (copyout(&v, addr, sizeof(v)) == 0)
return;
}
stopprofclock(p);
OpenPOWER on IntegriCloud