summaryrefslogtreecommitdiff
path: root/sys/netns/ns_input.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>2004-06-24 19:35:28 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>2004-06-24 19:35:28 +0000
commitc6cc17e855e1d9fe177fba41d00de6e89fdc852e (patch)
treebdc6bde04c820ca59fe49d60185cf6ac40b44e30 /sys/netns/ns_input.c
parent128dd71ffeec48b94e085c757b3626553d619e7c (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/netns/ns_input.c')
-rw-r--r--sys/netns/ns_input.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netns/ns_input.c b/sys/netns/ns_input.c
index e1eacc6cd29..909e9c47e6d 100644
--- a/sys/netns/ns_input.c
+++ b/sys/netns/ns_input.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: ns_input.c,v 1.6 2003/12/10 07:22:44 itojun Exp $ */
+/* $OpenBSD: ns_input.c,v 1.7 2004/06/24 19:35:26 tholo Exp $ */
/* $NetBSD: ns_input.c,v 1.9 1996/02/13 22:13:56 christos Exp $ */
/*
@@ -85,6 +85,7 @@ long ns_pexseq;
void
ns_init()
{
+ struct timeval tv;
ns_broadhost = * (union ns_host *) allones;
ns_broadnet = * (union ns_net *) allones;
@@ -92,7 +93,8 @@ ns_init()
nsrawpcb.nsp_next = nsrawpcb.nsp_prev = &nsrawpcb;
nsintrq.ifq_maxlen = nsqmaxlen;
TAILQ_INIT(&ns_ifaddr);
- ns_pexseq = time.tv_usec;
+ getmicrotime(&tv);
+ ns_pexseq = tv.tv_usec;
ns_netmask.sns_len = 6;
ns_netmask.sns_addr.x_net = ns_broadnet;
ns_hostmask.sns_len = 12;