mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-16 08:43:17 +00:00
Document new sys_arch_mbox_tryfetch requirement for ports
This commit is contained in:
parent
9bc49b3268
commit
9d43d74ee3
@ -99,6 +99,19 @@ The following functions must be implemented by the sys_arch:
|
|||||||
Note that a function with a similar name, sys_mbox_fetch(), is
|
Note that a function with a similar name, sys_mbox_fetch(), is
|
||||||
implemented by lwIP.
|
implemented by lwIP.
|
||||||
|
|
||||||
|
- u32_t sys_arch_mbox_tryfetch(sys_mbox_t mbox, void **msg)
|
||||||
|
|
||||||
|
This is similar to sys_arch_mbox_fetch, however if a message is not
|
||||||
|
present in the mailbox, it immediately returns with the code
|
||||||
|
SYS_MBOX_EMPTY.
|
||||||
|
|
||||||
|
To allow for efficient implementations, this can be defined as a
|
||||||
|
function-like macro in sys_arch.h instead of a normal function. For
|
||||||
|
example, a naive implementation could be:
|
||||||
|
#define sys_arch_mbox_tryfetch(mbox,msg) \
|
||||||
|
sys_arch_mbox_fetch(mbox,msg,1)
|
||||||
|
although this would introduce unnecessary delays.
|
||||||
|
|
||||||
- struct sys_timeouts *sys_arch_timeouts(void)
|
- struct sys_timeouts *sys_arch_timeouts(void)
|
||||||
|
|
||||||
Returns a pointer to the per-thread sys_timeouts structure. In lwIP,
|
Returns a pointer to the per-thread sys_timeouts structure. In lwIP,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user