mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-16 07:09:58 +00:00
SNMP: Support LWIP_TCPIP_CORE_LOCKING sync method
This commit is contained in:
parent
5d637360cc
commit
9fbf5a4004
@ -91,10 +91,17 @@ netif_to_num(const struct netif *netif)
|
|||||||
|
|
||||||
#if SNMP_USE_NETCONN
|
#if SNMP_USE_NETCONN
|
||||||
#include "lwip/tcpip.h"
|
#include "lwip/tcpip.h"
|
||||||
|
#include "lwip/priv/tcpip_priv.h"
|
||||||
void
|
void
|
||||||
snmp_mib2_lwip_synchronizer(snmp_threadsync_called_fn fn, void* arg)
|
snmp_mib2_lwip_synchronizer(snmp_threadsync_called_fn fn, void* arg)
|
||||||
{
|
{
|
||||||
|
#if LWIP_TCPIP_CORE_LOCKING
|
||||||
|
LOCK_TCPIP_CORE();
|
||||||
|
fn(arg);
|
||||||
|
UNLOCK_TCPIP_CORE();
|
||||||
|
#else
|
||||||
tcpip_callback_with_block(fn, arg, 1);
|
tcpip_callback_with_block(fn, arg, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
struct snmp_threadsync_instance snmp_mib2_lwip_locks;
|
struct snmp_threadsync_instance snmp_mib2_lwip_locks;
|
||||||
|
Loading…
Reference in New Issue
Block a user