The Pedigree Project
0.1
|
Functions | |
err_t | sys_mbox_new (sys_mbox_t *mbox, int size) |
void | sys_mbox_post (sys_mbox_t *mbox, void *msg) |
err_t | sys_mbox_trypost (sys_mbox_t *mbox, void *msg) |
u32_t | sys_arch_mbox_fetch (sys_mbox_t *mbox, void **msg, u32_t timeout) |
u32_t | sys_arch_mbox_tryfetch (sys_mbox_t *mbox, void **msg) |
void | sys_mbox_free (sys_mbox_t *mbox) |
int | sys_mbox_valid (sys_mbox_t *mbox) |
void | sys_mbox_set_invalid (sys_mbox_t *mbox) |
u32_t sys_arch_mbox_fetch | ( | sys_mbox_t * | mbox, |
void ** | msg, | ||
u32_t | timeout | ||
) |
Wait for a new message to arrive in the mbox
mbox | mbox to get a message from |
msg | pointer where the message is stored |
timeout | maximum time (in milliseconds) to wait for a message (0 = wait forever) |
Definition at line 248 of file sys_arch.cc.
References SYS_ARCH_TIMEOUT.
u32_t sys_arch_mbox_tryfetch | ( | sys_mbox_t * | mbox, |
void ** | msg | ||
) |
Wait for a new message to arrive in the mbox
mbox | mbox to get a message from |
msg | pointer where the message is stored |
Definition at line 237 of file sys_arch.cc.
References SYS_MBOX_EMPTY.
void sys_mbox_free | ( | sys_mbox_t * | mbox | ) |
err_t sys_mbox_new | ( | sys_mbox_t * | mbox, |
int | size | ||
) |
Create a new mbox of specified size
mbox | pointer to the mbox to create |
size | (minimum) number of messages in this mbox |
Definition at line 220 of file sys_arch.cc.
References ERR_OK.
Referenced by tcpip_init().
void sys_mbox_post | ( | sys_mbox_t * | mbox, |
void * | msg | ||
) |
Post a message to an mbox - may not fail -> blocks if full, only used from tasks not from ISR
mbox | mbox to posts the message |
msg | message to post (ATTENTION: can be NULL) |
Definition at line 232 of file sys_arch.cc.
Referenced by tcpip_api_call(), tcpip_callback_with_block(), and tcpip_send_msg_wait_sem().
void sys_mbox_set_invalid | ( | sys_mbox_t * | mbox | ) |
Set an mbox invalid so that sys_mbox_valid returns 0
Definition at line 289 of file sys_arch.cc.
err_t sys_mbox_trypost | ( | sys_mbox_t * | mbox, |
void * | msg | ||
) |
Try to post a message to an mbox - may fail if full or ISR
mbox | mbox to posts the message |
msg | message to post (ATTENTION: can be NULL) |
Definition at line 272 of file sys_arch.cc.
References ERR_OK, and ERR_WOULDBLOCK.
Referenced by tcpip_callback_with_block(), tcpip_inpkt(), and tcpip_trycallback().
int sys_mbox_valid | ( | sys_mbox_t * | mbox | ) |
Check if an mbox is valid/allocated: return 1 for valid, 0 for invalid
Definition at line 284 of file sys_arch.cc.