mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +00:00
Add some comments to functions and #defines. According to Simon, LWIP core locking is not experimental any more.
This commit is contained in:
parent
f09dec5fb7
commit
bc51dddcaf
@ -314,7 +314,8 @@ tcpip_untimeout(sys_timeout_handler h, void *arg)
|
||||
|
||||
#if !LWIP_TCPIP_CORE_LOCKING
|
||||
/**
|
||||
* Generic way to dispatch an API message in TCPIP thread.
|
||||
* Generic way to dispatch an API message in TCPIP thread and wait for its
|
||||
* completion by blocking on a semaphore.
|
||||
*
|
||||
* @param fn function to be called from TCPIP thread
|
||||
* @param apimsg argument to API function
|
||||
@ -342,6 +343,16 @@ tcpip_send_api_msg(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem)
|
||||
}
|
||||
#endif /* !LWIP_TCPIP_CORE_LOCKING */
|
||||
|
||||
/**
|
||||
* Synchronously calls function in TCPIP thread and waits for its completion.
|
||||
* It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or
|
||||
* LWIP_NETCONN_SEM_PER_THREAD.
|
||||
* If not, a semaphore is created and destroyed on every call which is usually
|
||||
* an expensive/slow operation.
|
||||
* @param fn Function to call
|
||||
* @param call Call parameters
|
||||
* @return Return value from tcpip_api_call_fn
|
||||
*/
|
||||
err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call *call)
|
||||
{
|
||||
#if LWIP_TCPIP_CORE_LOCKING
|
||||
|
2264
src/apps/snmp/LwipMibCompiler/example/MOBANetClocksV2-MIB.mib
Normal file
2264
src/apps/snmp/LwipMibCompiler/example/MOBANetClocksV2-MIB.mib
Normal file
File diff suppressed because it is too large
Load Diff
1
src/apps/snmp/LwipMibCompiler/example/compile_moba_mib.sh
Executable file
1
src/apps/snmp/LwipMibCompiler/example/compile_moba_mib.sh
Executable file
@ -0,0 +1 @@
|
||||
../LwipMibCompiler/bin/Debug/LwipMibCompiler.exe ../example/MOBANetClocksV2-MIB.mib ./ ../Mibs/
|
1047
src/apps/snmp/LwipMibCompiler/example/mobanetclocksv2-mib.c
Normal file
1047
src/apps/snmp/LwipMibCompiler/example/mobanetclocksv2-mib.c
Normal file
File diff suppressed because it is too large
Load Diff
24
src/apps/snmp/LwipMibCompiler/example/mobanetclocksv2-mib.h
Normal file
24
src/apps/snmp/LwipMibCompiler/example/mobanetclocksv2-mib.h
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Generated by LwipMibCompiler
|
||||
*/
|
||||
|
||||
#ifndef MOBANETCLOCKSV2_MIB_H
|
||||
#define MOBANETCLOCKSV2_MIB_H MOBANETCLOCKSV2_MIB_H
|
||||
|
||||
#include "lwip/apps/snmp_opts.h"
|
||||
#if LWIP_SNMP
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "lwip/apps/snmp_core.h"
|
||||
|
||||
extern const struct snmp_mib mobatime;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LWIP_SNMP */
|
||||
#endif /* MOBANETCLOCKSV2_MIB_H */
|
@ -1463,8 +1463,12 @@
|
||||
----------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* LWIP_TCPIP_CORE_LOCKING: (EXPERIMENTAL!)
|
||||
* Don't use it if you're not an active lwIP project member
|
||||
* LWIP_TCPIP_CORE_LOCKING
|
||||
* Creates a global mutex that is held during TCPIP thread operations.
|
||||
* Can be locked by client code to perform lwIP operations without changing
|
||||
* into TCPIP thread using callbacks. See LOCK_TCPIP_CORE() and
|
||||
* UNLOCK_TCPIP_CORE().
|
||||
* Your system should provide mutexes supporting priority inversion to use this.
|
||||
*/
|
||||
#ifndef LWIP_TCPIP_CORE_LOCKING
|
||||
#define LWIP_TCPIP_CORE_LOCKING 0
|
||||
|
Loading…
Reference in New Issue
Block a user