diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 2004-06-24 19:35:28 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 2004-06-24 19:35:28 +0000 |
commit | c6cc17e855e1d9fe177fba41d00de6e89fdc852e (patch) | |
tree | bdc6bde04c820ca59fe49d60185cf6ac40b44e30 /sys/miscfs/portal | |
parent | 128dd71ffeec48b94e085c757b3626553d619e7c (diff) |
This moves access to wall and uptime variables in MI code,
encapsulating all such access into wall-defined functions
that makes sure locking is done as needed.
It also cleans up some uses of wall time vs. uptime some
places, but there is sure to be more of these needed as
well, particularily in MD code. Also, many current calls
to microtime() should probably be changed to getmicrotime(),
or to the {,get}microuptime() versions.
ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others
"Oh, that is not your problem!" from miod@
Diffstat (limited to 'sys/miscfs/portal')
-rw-r--r-- | sys/miscfs/portal/portal_vnops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c index bc7160c6812..a9e1afdb832 100644 --- a/sys/miscfs/portal/portal_vnops.c +++ b/sys/miscfs/portal/portal_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: portal_vnops.c,v 1.20 2004/06/06 01:00:51 tedu Exp $ */ +/* $OpenBSD: portal_vnops.c,v 1.21 2004/06/24 19:35:25 tholo Exp $ */ /* $NetBSD: portal_vnops.c,v 1.17 1996/02/13 13:12:57 mycroft Exp $ */ /* @@ -529,7 +529,6 @@ portal_getattr(v) } */ *ap = v; struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; - struct timeval tv; bzero(vap, sizeof(*vap)); vattr_null(vap); @@ -538,8 +537,7 @@ portal_getattr(v) vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; vap->va_size = DEV_BSIZE; vap->va_blocksize = DEV_BSIZE; - microtime(&tv); - TIMEVAL_TO_TIMESPEC(&tv, &vap->va_atime); + getnanotime(&vap->va_atime); vap->va_mtime = vap->va_atime; vap->va_ctime = vap->va_atime; vap->va_gen = 0; |