summaryrefslogtreecommitdiffstats
path: root/sys/net/if_llatbl.h
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-12-16 00:20:15 +0000
committerkmacy <kmacy@FreeBSD.org>2008-12-16 00:20:15 +0000
commit5cdc211f638438961eaa38c59ae16c94c1010f03 (patch)
tree7f0827c1e81bd5be2662204ebf136da2b78cfdc1 /sys/net/if_llatbl.h
parent505bc2976712d71f929aba1585a4b236ee50476c (diff)
downloadFreeBSD-src-5cdc211f638438961eaa38c59ae16c94c1010f03.zip
FreeBSD-src-5cdc211f638438961eaa38c59ae16c94c1010f03.tar.gz
add macro for destroying an llentry's rwlock
Diffstat (limited to 'sys/net/if_llatbl.h')
-rw-r--r--sys/net/if_llatbl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h
index 9e73405..50e617d 100644
--- a/sys/net/if_llatbl.h
+++ b/sys/net/if_llatbl.h
@@ -81,6 +81,7 @@ struct llentry {
#define LLE_DOWNGRADE(lle) rw_downgrade(&(lle)->lle_lock)
#define LLE_TRY_UPGRADE(lle) rw_try_upgrade(&(lle)->lle_lock)
#define LLE_LOCK_INIT(lle) rw_init_flags(&(lle)->lle_lock, "lle", RW_DUPOK)
+#define LLE_LOCK_DESTROY(lle) rw_destroy(&(lle)->lle_lock)
#define LLE_WLOCK_ASSERT(lle) rw_assert(&(lle)->lle_lock, RA_WLOCKED)
#define LLE_IS_VALID(lle) (((lle) != NULL) && ((lle) != (void *)-1))
@@ -119,7 +120,7 @@ struct llentry {
LLE_WUNLOCK(lle); \
} \
/* guard against invalid refs */ \
- lle = 0; \
+ lle = NULL; \
} while (0)
OpenPOWER on IntegriCloud