From 8da3c338df69c01d7b944522ec9ce80aa7f6b6f7 Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 1 Mar 2004 22:37:01 +0000 Subject: Rename NET_PICKUP_GIANT() to NET_LOCK_GIANT(), and NET_DROP_GIANT() to NET_UNLOCK_GIANT(). While they are used in similar ways, the semantics are quite different -- NET_LOCK_GIANT() and NET_UNLOCK_GIANT() directly wrap mutex lock and unlock operations, whereas drop/pickup special case the handling of Giant recursion. Add a comment saying as much. Add NET_ASSERT_GIANT(), which conditionally asserts Giant based on the value of debug_mpsafenet. --- sys/netinet/ip_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet/ip_input.c') diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 8100a62..b798092 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -936,9 +936,9 @@ DPRINTF(("ip_input: no SP, packet discarded\n"));/*XXX*/ *(struct sockaddr_in **)(mtag+1) = args.next_hop; m_tag_prepend(m, mtag); } - NET_PICKUP_GIANT(); + NET_LOCK_GIANT(); (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen); - NET_DROP_GIANT(); + NET_UNLOCK_GIANT(); return; bad: m_freem(m); -- cgit v1.1