summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-03-02 16:54:40 +0000
committerdes <des@FreeBSD.org>2003-03-02 16:54:40 +0000
commit2756b6c9641bd9899a346582c191310de25cccc5 (patch)
tree351747321ab136aa733f670c4c2c235b3639bc1e /sys/nfsclient
parent3780674329cabab230b12923047c8aa84e4f05fc (diff)
downloadFreeBSD-src-2756b6c9641bd9899a346582c191310de25cccc5.zip
FreeBSD-src-2756b6c9641bd9899a346582c191310de25cccc5.tar.gz
More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_bio.c8
-rw-r--r--sys/nfsclient/nfs_nfsiod.c4
-rw-r--r--sys/nfsclient/nfs_socket.c14
3 files changed, 13 insertions, 13 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index 1603946..c124e64 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -1085,7 +1085,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
*/
while (np->n_flag & NFLUSHINPROG) {
np->n_flag |= NFLUSHWANT;
- error = tsleep((caddr_t)&np->n_flag, PRIBIO + 2, "nfsvinval",
+ error = tsleep(&np->n_flag, PRIBIO + 2, "nfsvinval",
slptimeo);
if (error && intrflg &&
nfs_sigintr(nmp, NULL, td))
@@ -1103,7 +1103,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
np->n_flag &= ~NFLUSHINPROG;
if (np->n_flag & NFLUSHWANT) {
np->n_flag &= ~NFLUSHWANT;
- wakeup((caddr_t)&np->n_flag);
+ wakeup(&np->n_flag);
}
return (EINTR);
}
@@ -1112,7 +1112,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
if (np->n_flag & NFLUSHWANT) {
np->n_flag &= ~NFLUSHWANT;
- wakeup((caddr_t)&np->n_flag);
+ wakeup(&np->n_flag);
}
return (0);
}
@@ -1180,7 +1180,7 @@ again:
nfs_iodwant[iod] = NULL;
nfs_iodmount[iod] = nmp;
nmp->nm_bufqiods++;
- wakeup((caddr_t)&nfs_iodwant[iod]);
+ wakeup(&nfs_iodwant[iod]);
}
/*
diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c
index 8762b16..c244972 100644
--- a/sys/nfsclient/nfs_nfsiod.c
+++ b/sys/nfsclient/nfs_nfsiod.c
@@ -144,7 +144,7 @@ sysctl_iodmax(SYSCTL_HANDLER_ARGS)
iod = nfs_numasync - 1;
for (i = 0; i < nfs_numasync - nfs_iodmax; i++) {
if (nfs_iodwant[iod])
- wakeup((caddr_t)&nfs_iodwant[iod]);
+ wakeup(&nfs_iodwant[iod]);
iod--;
}
return (0);
@@ -244,7 +244,7 @@ nfssvc_iod(void *instance)
* Always keep at least nfs_iodmin kthreads.
*/
timo = (myiod < nfs_iodmin) ? 0 : nfs_iodmaxidle * hz;
- error = tsleep((caddr_t)&nfs_iodwant[myiod], PWAIT | PCATCH,
+ error = tsleep(&nfs_iodwant[myiod], PWAIT | PCATCH,
"nfsidl", timo);
}
if (error)
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c
index 612ed33..abb89d3 100644
--- a/sys/nfsclient/nfs_socket.c
+++ b/sys/nfsclient/nfs_socket.c
@@ -241,7 +241,7 @@ nfs_connect(struct nfsmount *nmp, struct nfsreq *rep)
*/
s = splnet();
while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) {
- (void) tsleep((caddr_t)&so->so_timeo,
+ (void) tsleep(&so->so_timeo,
PSOCK, "nfscon", 2 * hz);
if ((so->so_state & SS_ISCONNECTING) &&
so->so_error == 0 && rep &&
@@ -353,7 +353,7 @@ nfs_reconnect(struct nfsreq *rep)
while ((error = nfs_connect(nmp, rep)) != 0) {
if (error == EINTR || error == ERESTART)
return (EINTR);
- (void) tsleep((caddr_t)&lbolt, PSOCK, "nfscon", 0);
+ (void) tsleep(&lbolt, PSOCK, "nfscon", 0);
}
/*
@@ -1013,7 +1013,7 @@ tryagain:
error = 0;
waituntil = time_second + trylater_delay;
while (time_second < waituntil)
- (void) tsleep((caddr_t)&lbolt,
+ (void) tsleep(&lbolt,
PSOCK, "nqnfstry", 0);
trylater_delay *= nfs_backoff[trylater_cnt];
if (trylater_cnt < NFS_NBACKOFF - 1)
@@ -1272,7 +1272,7 @@ nfs_sndlock(struct nfsreq *rep)
if (nfs_sigintr(rep->r_nmp, rep, td))
return (EINTR);
*statep |= NFSSTA_WANTSND;
- (void) tsleep((caddr_t)statep, slpflag | (PZERO - 1),
+ (void) tsleep(statep, slpflag | (PZERO - 1),
"nfsndlck", slptimeo);
if (slpflag == PCATCH) {
slpflag = 0;
@@ -1296,7 +1296,7 @@ nfs_sndunlock(struct nfsreq *rep)
*statep &= ~NFSSTA_SNDLOCK;
if (*statep & NFSSTA_WANTSND) {
*statep &= ~NFSSTA_WANTSND;
- wakeup((caddr_t)statep);
+ wakeup(statep);
}
}
@@ -1314,7 +1314,7 @@ nfs_rcvlock(struct nfsreq *rep)
if (nfs_sigintr(rep->r_nmp, rep, rep->r_td))
return (EINTR);
*statep |= NFSSTA_WANTRCV;
- (void) tsleep((caddr_t)statep, slpflag | (PZERO - 1), "nfsrcvlk",
+ (void) tsleep(statep, slpflag | (PZERO - 1), "nfsrcvlk",
slptimeo);
/*
* If our reply was recieved while we were sleeping,
@@ -1349,7 +1349,7 @@ nfs_rcvunlock(struct nfsreq *rep)
*statep &= ~NFSSTA_RCVLOCK;
if (*statep & NFSSTA_WANTRCV) {
*statep &= ~NFSSTA_WANTRCV;
- wakeup((caddr_t)statep);
+ wakeup(statep);
}
}
OpenPOWER on IntegriCloud