summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_dummynet.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-08-06 14:26:03 +0000
committerrwatson <rwatson@FreeBSD.org>2007-08-06 14:26:03 +0000
commit23574c86734ab5cb088584d30345e698cbbeaef2 (patch)
tree63e9e0c42ec5669b83e25b5f9cbdcbee7e1be6dc /sys/netinet/ip_dummynet.c
parent5f4b9d20fc4bf36bf86f78bb1622ee474a93dc56 (diff)
downloadFreeBSD-src-23574c86734ab5cb088584d30345e698cbbeaef2.zip
FreeBSD-src-23574c86734ab5cb088584d30345e698cbbeaef2.tar.gz
Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which
previously conditionally acquired Giant based on debug.mpsafenet. As that has now been removed, they are no longer required. Removing them significantly simplifies error-handling in the socket layer, eliminated quite a bit of unwinding of locking in error cases. While here clean up the now unneeded opt_net.h, which previously was used for the NET_WITH_GIANT kernel option. Clean up some related gotos for consistency. Reviewed by: bz, csjp Tested by: kris Approved by: re (kensmith)
Diffstat (limited to 'sys/netinet/ip_dummynet.c')
-rw-r--r--sys/netinet/ip_dummynet.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index c800682..1e79a3a 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -203,10 +203,7 @@ static struct mtx dummynet_mtx;
#define DUMMYNET_LOCK_DESTROY() mtx_destroy(&dummynet_mtx)
#define DUMMYNET_LOCK() mtx_lock(&dummynet_mtx)
#define DUMMYNET_UNLOCK() mtx_unlock(&dummynet_mtx)
-#define DUMMYNET_LOCK_ASSERT() do { \
- mtx_assert(&dummynet_mtx, MA_OWNED); \
- NET_ASSERT_GIANT(); \
-} while (0)
+#define DUMMYNET_LOCK_ASSERT() mtx_assert(&dummynet_mtx, MA_OWNED)
static int config_pipe(struct dn_pipe *p);
static int ip_dn_ctl(struct sockopt *sopt);
@@ -738,7 +735,6 @@ dummynet_task(void *context, int pending)
void *p; /* generic parameter to handler */
int i;
- NET_LOCK_GIANT();
DUMMYNET_LOCK();
heaps[0] = &ready_heap; /* fixed-rate queues */
@@ -825,8 +821,6 @@ dummynet_task(void *context, int pending)
dummynet_send(head);
callout_reset(&dn_timeout, 1, dummynet, NULL);
-
- NET_UNLOCK_GIANT();
}
static void
OpenPOWER on IntegriCloud