From c6cc17e855e1d9fe177fba41d00de6e89fdc852e Mon Sep 17 00:00:00 2001 From: Thorsten Lockert Date: Thu, 24 Jun 2004 19:35:28 +0000 Subject: 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@ --- sys/miscfs/portal/portal_vnops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/miscfs/portal') 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; -- cgit v1.2.3