Add some comments to functions and #defines. According to Simon, LWIP core locking is not experimental any more.

This commit is contained in:
Dirk Ziegelmeier 2016-03-16 17:46:06 +01:00
parent f09dec5fb7
commit bc51dddcaf
6 changed files with 3354 additions and 3 deletions

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
../LwipMibCompiler/bin/Debug/LwipMibCompiler.exe ../example/MOBANetClocksV2-MIB.mib ./ ../Mibs/

File diff suppressed because it is too large Load Diff

View 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 */

View File

@ -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