gnrc_netif2: make more complexer functions not inline
This commit is contained in:
parent
cb3c27dc29
commit
62a1f0848f
@ -39,12 +39,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
static inline void gnrc_netif2_acquire(gnrc_netif2_t *netif)
|
void gnrc_netif2_acquire(gnrc_netif2_t *netif);
|
||||||
{
|
|
||||||
if (netif && (netif->ops)) {
|
|
||||||
rmutex_lock(&netif->mutex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Releases exclusive access to the interface
|
* @brief Releases exclusive access to the interface
|
||||||
@ -53,12 +48,7 @@ static inline void gnrc_netif2_acquire(gnrc_netif2_t *netif)
|
|||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
static inline void gnrc_netif2_release(gnrc_netif2_t *netif)
|
void gnrc_netif2_release(gnrc_netif2_t *netif);
|
||||||
{
|
|
||||||
if (netif && (netif->ops)) {
|
|
||||||
rmutex_unlock(&netif->mutex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(MODULE_GNRC_IPV6) || DOXYGEN
|
#if defined(MODULE_GNRC_IPV6) || DOXYGEN
|
||||||
/**
|
/**
|
||||||
@ -344,17 +334,7 @@ static inline bool gnrc_netif2_is_rtr_adv(const gnrc_netif2_t *netif)
|
|||||||
* @return true, if the interface represents a 6LN
|
* @return true, if the interface represents a 6LN
|
||||||
* @return false, if the interface does not represent a 6LN
|
* @return false, if the interface does not represent a 6LN
|
||||||
*/
|
*/
|
||||||
static inline bool gnrc_netif2_is_6ln(const gnrc_netif2_t *netif)
|
bool gnrc_netif2_is_6ln(const gnrc_netif2_t *netif);
|
||||||
{
|
|
||||||
switch (netif->device_type) {
|
|
||||||
case NETDEV_TYPE_IEEE802154:
|
|
||||||
case NETDEV_TYPE_CC110X:
|
|
||||||
case NETDEV_TYPE_NRFMIN:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checks if the interface represents a 6Lo router (6LR) according to
|
* @brief Checks if the interface represents a 6Lo router (6LR) according to
|
||||||
|
|||||||
@ -428,6 +428,20 @@ size_t gnrc_netif2_addr_from_str(const char *str, uint8_t *out)
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gnrc_netif2_acquire(gnrc_netif2_t *netif)
|
||||||
|
{
|
||||||
|
if (netif && (netif->ops)) {
|
||||||
|
rmutex_lock(&netif->mutex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void gnrc_netif2_release(gnrc_netif2_t *netif)
|
||||||
|
{
|
||||||
|
if (netif && (netif->ops)) {
|
||||||
|
rmutex_unlock(&netif->mutex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef MODULE_GNRC_IPV6
|
#ifdef MODULE_GNRC_IPV6
|
||||||
static inline bool _addr_anycast(const gnrc_netif2_t *netif, unsigned idx);
|
static inline bool _addr_anycast(const gnrc_netif2_t *netif, unsigned idx);
|
||||||
static int _addr_idx(const gnrc_netif2_t *netif, const ipv6_addr_t *addr);
|
static int _addr_idx(const gnrc_netif2_t *netif, const ipv6_addr_t *addr);
|
||||||
@ -1028,9 +1042,20 @@ static int _group_idx(const gnrc_netif2_t *netif, const ipv6_addr_t *addr)
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MODULE_GNRC_IPV6 */
|
#endif /* MODULE_GNRC_IPV6 */
|
||||||
|
|
||||||
|
bool gnrc_netif2_is_6ln(const gnrc_netif2_t *netif)
|
||||||
|
{
|
||||||
|
switch (netif->device_type) {
|
||||||
|
case NETDEV_TYPE_IEEE802154:
|
||||||
|
case NETDEV_TYPE_CC110X:
|
||||||
|
case NETDEV_TYPE_NRFMIN:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void _update_l2addr_from_dev(gnrc_netif2_t *netif)
|
static void _update_l2addr_from_dev(gnrc_netif2_t *netif)
|
||||||
{
|
{
|
||||||
netdev_t *dev = netif->dev;
|
netdev_t *dev = netif->dev;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user