mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-14 04:06:35 +08:00
New function tcpip_callback_wait() * Call a function inside the tcpip thread and block the calling thread until the callback finishes.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
committed by
Simon Goldschmidt
parent
3546a0a4a0
commit
9dca4a0211
@@ -123,7 +123,8 @@ enum tcpip_msg_type {
|
||||
TCPIP_MSG_UNTIMEOUT,
|
||||
#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */
|
||||
TCPIP_MSG_CALLBACK,
|
||||
TCPIP_MSG_CALLBACK_STATIC
|
||||
TCPIP_MSG_CALLBACK_STATIC,
|
||||
TCPIP_MSG_CALLBACK_STATIC_WAIT
|
||||
};
|
||||
|
||||
struct tcpip_msg {
|
||||
@@ -139,6 +140,11 @@ struct tcpip_msg {
|
||||
struct tcpip_api_call_data *arg;
|
||||
sys_sem_t *sem;
|
||||
} api_call;
|
||||
struct {
|
||||
tcpip_callback_fn function;
|
||||
void *ctx;
|
||||
sys_sem_t *sem;
|
||||
} cb_wait;
|
||||
#endif /* LWIP_TCPIP_CORE_LOCKING */
|
||||
#if !LWIP_TCPIP_CORE_LOCKING_INPUT
|
||||
struct {
|
||||
|
||||
@@ -81,6 +81,7 @@ err_t tcpip_input(struct pbuf *p, struct netif *inp);
|
||||
|
||||
err_t tcpip_try_callback(tcpip_callback_fn function, void *ctx);
|
||||
err_t tcpip_callback(tcpip_callback_fn function, void *ctx);
|
||||
err_t tcpip_callback_wait(tcpip_callback_fn function, void *ctx);
|
||||
/** @ingroup lwip_os
|
||||
* @deprecated use tcpip_try_callback() or tcpip_callback() instead
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user