|
The Pedigree Project 0.1
|
Include dependency graph for tcpip_priv.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | tcpip_api_call_data |
| struct | tcpip_msg |
Macros | |
| #define | API_VAR_REF(name) name |
| #define | API_VAR_DECLARE(type, name) type name |
| #define | API_VAR_ALLOC(type, pool, name, errorval) |
| #define | API_VAR_ALLOC_POOL(type, pool, name, errorval) |
| #define | API_VAR_FREE(pool, name) |
| #define | API_VAR_FREE_POOL(pool, name) |
| #define | API_EXPR_REF(expr) expr |
| #define | API_EXPR_REF_SEM(expr) API_EXPR_REF(expr) |
| #define | API_EXPR_DEREF(expr) (*(expr)) |
| #define | API_MSG_M_DEF(m) *m |
| #define | API_MSG_M_DEF_C(t, m) const t * m |
Typedefs | |
| typedef err_t(* | tcpip_api_call_fn) (struct tcpip_api_call_data *call) |
Enumerations | |
| enum | tcpip_msg_type { TCPIP_MSG_API , TCPIP_MSG_API_CALL , TCPIP_MSG_INPKT , TCPIP_MSG_CALLBACK , TCPIP_MSG_CALLBACK_STATIC , TCPIP_MSG_SHUTDOWN } |
Functions | |
| err_t | tcpip_send_msg_wait_sem (tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem) |
| err_t | tcpip_api_call (tcpip_api_call_fn fn, struct tcpip_api_call_data *call) |
TCPIP API internal implementations (do not use in application code)
Definition in file tcpip_priv.h.
| #define API_EXPR_DEREF | ( | expr | ) | (*(expr)) |
Definition at line 109 of file tcpip_priv.h.
| #define API_EXPR_REF | ( | expr | ) | expr |
Definition at line 107 of file tcpip_priv.h.
| #define API_EXPR_REF_SEM | ( | expr | ) | API_EXPR_REF(expr) |
Definition at line 108 of file tcpip_priv.h.
| #define API_MSG_M_DEF | ( | m | ) | *m |
Definition at line 110 of file tcpip_priv.h.
| #define API_MSG_M_DEF_C | ( | t, | |
| m | |||
| ) | const t * m |
Definition at line 111 of file tcpip_priv.h.
| #define API_VAR_ALLOC | ( | type, | |
| pool, | |||
| name, | |||
| errorval | |||
| ) |
Definition at line 103 of file tcpip_priv.h.
| #define API_VAR_ALLOC_POOL | ( | type, | |
| pool, | |||
| name, | |||
| errorval | |||
| ) |
Definition at line 104 of file tcpip_priv.h.
| #define API_VAR_DECLARE | ( | type, | |
| name | |||
| ) | type name |
Definition at line 102 of file tcpip_priv.h.
| #define API_VAR_FREE | ( | pool, | |
| name | |||
| ) |
Definition at line 105 of file tcpip_priv.h.
| #define API_VAR_FREE_POOL | ( | pool, | |
| name | |||
| ) |
Definition at line 106 of file tcpip_priv.h.
| #define API_VAR_REF | ( | name | ) | name |
Definition at line 101 of file tcpip_priv.h.
| typedef err_t(* tcpip_api_call_fn) (struct tcpip_api_call_data *call) |
Definition at line 127 of file tcpip_priv.h.
| enum tcpip_msg_type |
Definition at line 130 of file tcpip_priv.h.
| 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.
| fn | Function to call |
| call | Call parameters |
Definition at line 529 of file tcpip.c.
References ERR_CLSD, ERR_MEM, ERR_OK, memp_malloc(), sys_arch_sem_wait(), sys_mbox_post(), sys_mbox_valid_val, sys_sem_free(), and sys_sem_new().
| 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.
| fn | function to be called from TCPIP thread |
| apimsg | argument to API function |
| sem | semaphore to wait on |
Definition at line 482 of file tcpip.c.
References ERR_CLSD, ERR_MEM, ERR_OK, LWIP_UNUSED_ARG, memp_malloc(), sys_arch_sem_wait(), sys_mbox_post(), sys_mbox_valid_val, and sys_sem_valid().