summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timer.c
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2017-10-29 14:56:36 +0000
committerflorian <florian@openbsd.org>2017-10-29 14:56:36 +0000
commit9b2f66c9e3abe0b95cec7165776bed852d4e61d8 (patch)
treedb4e96d91f0cd67de476193b0b82d648455007f3 /sys/netinet/tcp_timer.c
parentUnify protoize.1 install process on gcc3 arch (luna88k). (diff)
downloadwireguard-openbsd-9b2f66c9e3abe0b95cec7165776bed852d4e61d8.tar.xz
wireguard-openbsd-9b2f66c9e3abe0b95cec7165776bed852d4e61d8.zip
Move NET_{,UN}LOCK into individual slowtimo functions.
Direction suggested by mpi OK mpi, visa
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r--sys/netinet/tcp_timer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 91aa0cbe4dd..1260d14d53e 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_timer.c,v 1.59 2017/10/25 12:38:21 job Exp $ */
+/* $OpenBSD: tcp_timer.c,v 1.60 2017/10/29 14:56:36 florian Exp $ */
/* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */
/*
@@ -128,11 +128,13 @@ tcp_delack(void *arg)
void
tcp_slowtimo(void)
{
- NET_ASSERT_LOCKED();
+ NET_LOCK();
tcp_maxidle = TCPTV_KEEPCNT * tcp_keepintvl;
tcp_iss += TCP_ISSINCR2/PR_SLOWHZ; /* increment iss */
tcp_now++; /* for timestamps */
+
+ NET_UNLOCK();
}
/*