diff options
author | phk <phk@FreeBSD.org> | 1998-03-30 09:56:58 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-03-30 09:56:58 +0000 |
commit | 9b703b14551addf9806978973e2ddc427d4908b4 (patch) | |
tree | 91f2de8432f719153d0de9465a9ebeee33c29077 /sys/nfsclient/nfsstats.h | |
parent | add2782c4ec0d7c4447da2b33d1413a2754f8a3e (diff) | |
download | FreeBSD-src-9b703b14551addf9806978973e2ddc427d4908b4.zip FreeBSD-src-9b703b14551addf9806978973e2ddc427d4908b4.tar.gz |
Eradicate the variable "time" from the kernel, using various measures.
"time" wasn't a atomic variable, so splfoo() protection were needed
around any access to it, unless you just wanted the seconds part.
Most uses of time.tv_sec now uses the new variable time_second instead.
gettime() changed to getmicrotime(0.
Remove a couple of unneeded splfoo() protections, the new getmicrotime()
is atomic, (until Bruce sets a breakpoint in it).
A couple of places needed random data, so use read_random() instead
of mucking about with time which isn't random.
Add a new nfs_curusec() function.
Mark a couple of bogosities involving the now disappeard time variable.
Update ffs_update() to avoid the weird "== &time" checks, by fixing the
one remaining call that passwd &time as args.
Change profiling in ncr.c to use ticks instead of time. Resolution is
the same.
Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call
hzto() which subtracts time" sequences.
Reviewed by: bde
Diffstat (limited to 'sys/nfsclient/nfsstats.h')
-rw-r--r-- | sys/nfsclient/nfsstats.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/nfsclient/nfsstats.h b/sys/nfsclient/nfsstats.h index 9f057a3..8b28c00 100644 --- a/sys/nfsclient/nfsstats.h +++ b/sys/nfsclient/nfsstats.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.32 1997/10/12 20:25:38 phk Exp $ + * $Id: nfs.h,v 1.33 1998/02/01 21:23:29 bde Exp $ */ #ifndef _NFS_NFS_H_ @@ -108,9 +108,9 @@ */ #define NFS_ATTRTIMEO(np) \ ((((np)->n_flag & NMODIFIED) || \ - (time.tv_sec - (np)->n_mtime) / 10 < NFS_MINATTRTIMO) ? NFS_MINATTRTIMO : \ - ((time.tv_sec - (np)->n_mtime) / 10 > NFS_MAXATTRTIMO ? NFS_MAXATTRTIMO : \ - (time.tv_sec - (np)->n_mtime) / 10)) + (time_second - (np)->n_mtime) / 10 < NFS_MINATTRTIMO) ? NFS_MINATTRTIMO : \ + ((time_second - (np)->n_mtime) / 10 > NFS_MAXATTRTIMO ? NFS_MAXATTRTIMO : \ + (time_second - (np)->n_mtime) / 10)) /* * Expected allocation sizes for major data structures. If the actual size @@ -571,6 +571,7 @@ extern int nfs_debug; #endif +u_quad_t nfs_curusec __P((void)); int nfs_init __P((struct vfsconf *vfsp)); int nfs_reply __P((struct nfsreq *)); int nfs_getreq __P((struct nfsrv_descript *,struct nfsd *,int)); |