mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-27 10:41:12 +08:00
Fixed compiling api with LWIP_NETCONN_SEM_PER_THREAD==1 && LWIP_MPU_COMPATIBLE==1
This commit is contained in:
@@ -58,9 +58,15 @@ extern "C" {
|
||||
#if LWIP_MPU_COMPATIBLE
|
||||
#define API_MSG_M_DEF(m) m
|
||||
#define API_MSG_M_DEF_C(t, m) t m
|
||||
#ifdef LWIP_NETCONN_SEM_PER_THREAD
|
||||
#define API_MSG_M_DEF_SEM(m) *m
|
||||
#else
|
||||
#define API_MSG_M_DEF_SEM(m) API_MSG_M_DEF(m)
|
||||
#endif
|
||||
#else /* LWIP_MPU_COMPATIBLE */
|
||||
#define API_MSG_M_DEF(m) *m
|
||||
#define API_MSG_M_DEF_C(t, m) const t * m
|
||||
#define API_MSG_M_DEF_SEM(m) API_MSG_M_DEF(m)
|
||||
#endif /* LWIP_MPU_COMPATIBLE */
|
||||
|
||||
/* For the netconn API, these values are use as a bitmask! */
|
||||
@@ -177,7 +183,7 @@ struct dns_api_msg {
|
||||
#endif /* LWIP_IPV4 && LWIP_IPV6 */
|
||||
/** This semaphore is posted when the name is resolved, the application thread
|
||||
should wait on it. */
|
||||
sys_sem_t API_MSG_M_DEF(sem);
|
||||
sys_sem_t API_MSG_M_DEF_SEM(sem);
|
||||
/** Errors are given back here */
|
||||
err_t API_MSG_M_DEF(err);
|
||||
};
|
||||
|
||||
@@ -114,6 +114,11 @@ extern sys_mutex_t lock_tcpip_core;
|
||||
} while(0)
|
||||
#define API_VAR_FREE(pool, name) memp_free(pool, name)
|
||||
#define API_EXPR_REF(expr) &(expr)
|
||||
#if LWIP_NETCONN_SEM_PER_THREAD
|
||||
#define API_EXPR_REF_SEM(expr) (expr)
|
||||
#else
|
||||
#define API_EXPR_REF_SEM(expr) API_EXPR_REF(expr)
|
||||
#endif
|
||||
#define API_EXPR_DEREF(expr) expr
|
||||
#else /* LWIP_MPU_COMPATIBLE */
|
||||
#define API_VAR_REF(name) name
|
||||
@@ -122,6 +127,7 @@ extern sys_mutex_t lock_tcpip_core;
|
||||
#define API_VAR_ALLOC_DONTFAIL(type, pool, name)
|
||||
#define API_VAR_FREE(pool, name)
|
||||
#define API_EXPR_REF(expr) expr
|
||||
#define API_EXPR_REF_SEM(expr) API_EXPR_REF(expr)
|
||||
#define API_EXPR_DEREF(expr) *(expr)
|
||||
#endif /* LWIP_MPU_COMPATIBLE */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user