From 1ce19e26b4e4272a09f2f35d42bf638f98f99cd6 Mon Sep 17 00:00:00 2001 From: "Martine S. Lenders" Date: Fri, 11 Oct 2019 12:13:32 +0200 Subject: [PATCH] gnrc_ipv6_nib: wrap mutex lock/unlock in function --- .../gnrc/network_layer/ipv6/nib/_nib-internal.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h b/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h index 145de403f2..d1453e50b8 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h @@ -266,6 +266,22 @@ extern _nib_dr_entry_t *_prime_def_router; */ void _nib_init(void); +/** + * @brief Acquire exclusive access to the NIB + */ +static inline void _nib_acquire(void) +{ + mutex_lock(&_nib_mutex); +} + +/** + * @brief Release exclusive access to the NIB + */ +static inline void _nib_release(void) +{ + mutex_unlock(&_nib_mutex); +} + /** * @brief Gets interface identifier from a NIB entry *