From 9b703b14551addf9806978973e2ddc427d4908b4 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 30 Mar 1998 09:56:58 +0000 Subject: 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 --- sys/net/if_atmsubr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/net/if_atmsubr.c') diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c index b005f80..7df2626 100644 --- a/sys/net/if_atmsubr.c +++ b/sys/net/if_atmsubr.c @@ -108,7 +108,7 @@ atm_output(ifp, m0, dst, rt0) if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) senderr(ENETDOWN); - gettime(&ifp->if_lastchange); + getmicrotime(&ifp->if_lastchange); /* * check route @@ -263,7 +263,7 @@ atm_input(ifp, ah, m, rxhand) m_freem(m); return; } - gettime(&ifp->if_lastchange); + getmicrotime(&ifp->if_lastchange); ifp->if_ibytes += m->m_pkthdr.len; #if NBPFILTER > 0 -- cgit v1.1