more caddr_t removal.

This commit is contained in:
alfred 2002-06-29 02:00:02 +00:00
parent dd93a26aa4
commit 605a47a717
9 changed files with 26 additions and 35 deletions

View File

@ -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);
}

View File

@ -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);
}
/*

View File

@ -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 @@ wakeup(ident)
maybe_resched(td);
} else {
p->p_sflag |= PS_SWAPINREQ;
wakeup((caddr_t)&proc0);
wakeup(&proc0);
}
/* END INLINE EXPANSION */
goto restart;
@ -680,7 +680,7 @@ wakeup_one(ident)
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);

View File

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

View File

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

View File

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

View File

@ -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);
}

View File

@ -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);
}

View File

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