summaryrefslogtreecommitdiffstats
path: root/sys/net/if_atmsubr.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-11-18 13:37:56 +0000
committerbde <bde@FreeBSD.org>1997-11-18 13:37:56 +0000
commitf3b73cd7962b572263fdcc293064ca55fb57e698 (patch)
treedca3fd4f9687356791b6afb5c26a56098df9bcc6 /sys/net/if_atmsubr.c
parent04ec9f4541e358f1eb075a0359e22fff0998bd6d (diff)
downloadFreeBSD-src-f3b73cd7962b572263fdcc293064ca55fb57e698.zip
FreeBSD-src-f3b73cd7962b572263fdcc293064ca55fb57e698.tar.gz
Use gettime() instead of assignment from `time'. (`time' is too
volatile to use outside of splclock(). microtime() is probably too expensive to use for every i/o. However, setting ifi_lastchange for every i/o is just wrong according to the comment about ifi_lastchange in <net/if.h>. It is set then for atm, fddi and the latest version of ppp.)
Diffstat (limited to 'sys/net/if_atmsubr.c')
-rw-r--r--sys/net/if_atmsubr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c
index cc0222b..d97a086 100644
--- a/sys/net/if_atmsubr.c
+++ b/sys/net/if_atmsubr.c
@@ -38,7 +38,6 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
@@ -106,7 +105,7 @@ atm_output(ifp, m0, dst, rt0)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
- ifp->if_lastchange = time;
+ gettime(&ifp->if_lastchange);
/*
* check route
@@ -261,7 +260,7 @@ atm_input(ifp, ah, m, rxhand)
m_freem(m);
return;
}
- ifp->if_lastchange = time;
+ gettime(&ifp->if_lastchange);
ifp->if_ibytes += m->m_pkthdr.len;
#if NBPFILTER > 0
OpenPOWER on IntegriCloud