From c279ab4ad6f9f66da44540e16fd2920a72d40407 Mon Sep 17 00:00:00 2001 From: kan Date: Sun, 7 Mar 2004 16:28:31 +0000 Subject: Convert from timeout to callout API. Submitted by: rwatson --- sys/nfsserver/nfs.h | 2 +- sys/nfsserver/nfs_srvsock.c | 4 ++-- sys/nfsserver/nfs_srvsubs.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h index 07c74bf..2e0808d 100644 --- a/sys/nfsserver/nfs.h +++ b/sys/nfsserver/nfs.h @@ -132,7 +132,7 @@ struct uio; struct vattr; struct nameidata; -extern struct callout_handle nfsrv_timer_handle; +extern struct callout nfsrv_callout; extern struct nfsrvstats nfsrvstats; extern int nfsrv_ticks; diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c index 7492699..241881d 100644 --- a/sys/nfsserver/nfs_srvsock.c +++ b/sys/nfsserver/nfs_srvsock.c @@ -96,7 +96,7 @@ SYSCTL_INT(_vfs_nfsrv, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, */ #define NFS_CWNDSCALE 256 #define NFS_MAXCWND (NFS_CWNDSCALE * 32) -struct callout_handle nfsrv_timer_handle; +struct callout nfsrv_callout; static void nfs_realign(struct mbuf **pm, int hsiz); /* XXX SHARED */ static int nfsrv_getstream(struct nfssvc_sock *, int); @@ -779,5 +779,5 @@ nfsrv_timer(void *arg) nfsrv_wakenfsd(slp); } splx(s); - nfsrv_timer_handle = timeout(nfsrv_timer, NULL, nfsrv_ticks); + callout_reset(&nfsrv_callout, nfsrv_ticks, nfsrv_timer, NULL); } diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index a50fb2c..eceb68c 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -545,6 +545,7 @@ nfsrv_modevent(module_t mod, int type, void *data) nfsrv_init(0); /* Init server data structures */ nfsrv_initcache(); /* Init the server request cache */ + callout_init(&nfsrv_callout, 0); nfsrv_timer(0); nfs_prev_nfssvc_sy_narg = sysent[SYS_nfssvc].sy_narg; @@ -555,7 +556,7 @@ nfsrv_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: - untimeout(nfsrv_timer, (void *)NULL, nfsrv_timer_handle); + callout_stop(&nfsrv_callout); sysent[SYS_nfssvc].sy_narg = nfs_prev_nfssvc_sy_narg; sysent[SYS_nfssvc].sy_call = nfs_prev_nfssvc_sy_call; break; -- cgit v1.1