summaryrefslogtreecommitdiffstats
path: root/sys
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
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')
-rw-r--r--sys/net/if_atmsubr.c5
-rw-r--r--sys/net/if_fddisubr.c6
2 files changed, 5 insertions, 6 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
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index dcfde69c..060409f 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp
- * $Id: if_fddisubr.c,v 1.20 1997/08/02 14:32:36 bde Exp $
+ * $Id: if_fddisubr.c,v 1.21 1997/10/29 07:59:27 julian Exp $
*/
#include <sys/param.h>
@@ -145,7 +145,7 @@ fddi_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);
#if !defined(__bsdi__) || _BSDI_VERSION >= 199401
if (rt = rt0) {
if ((rt->rt_flags & RTF_UP) == 0) {
@@ -470,7 +470,7 @@ fddi_input(ifp, fh, m)
m_freem(m);
return;
}
- ifp->if_lastchange = time;
+ gettime(&ifp->if_lastchange);
ifp->if_ibytes += m->m_pkthdr.len + sizeof (*fh);
if (fh->fddi_dhost[0] & 1) {
if (bcmp((caddr_t)fddibroadcastaddr, (caddr_t)fh->fddi_dhost,
OpenPOWER on IntegriCloud