Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os by
tcpip_priv.h File Reference
TCPIP API internal implementations (do not use in application code) More...
Go to the source code of this file.
Functions | |
err_t | tcpip_send_msg_wait_sem (tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem) |
Sends a message to TCPIP thread to call a function. | |
err_t | tcpip_api_call (tcpip_api_call_fn fn, struct tcpip_api_call_data *call) |
Synchronously calls function in TCPIP thread and waits for its completion. |
Detailed Description
TCPIP API internal implementations (do not use in application code)
Definition in file tcpip_priv.h.
Function Documentation
err_t tcpip_api_call | ( | tcpip_api_call_fn | fn, |
struct tcpip_api_call_data * | call | ||
) |
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.
- Parameters:
-
fn Function to call call Call parameters
- Returns:
- Return value from tcpip_api_call_fn
Definition at line 358 of file lwip_tcpip.c.
err_t tcpip_send_msg_wait_sem | ( | tcpip_callback_fn | fn, |
void * | apimsg, | ||
sys_sem_t * | sem | ||
) |
Sends a message to TCPIP thread to call a function.
Caller thread blocks on on a provided semaphore, which ist NOT automatically signalled by TCPIP thread, this has to be done by the user. It is recommended to use LWIP_TCPIP_CORE_LOCKING since this is the way with least runtime overhead.
- Parameters:
-
fn function to be called from TCPIP thread apimsg argument to API function sem semaphore to wait on
- Returns:
- ERR_OK if the function was called, another err_t if not
Definition at line 322 of file lwip_tcpip.c.
Generated on Tue Jul 12 2022 13:16:25 by
