UbixOS
2.0
|
Functions | |
uint32_t | sys_arch_mbox_fetch (struct sys_mbox **mb, void **msg, uint32_t timeout) |
uint32_t | sys_arch_mbox_tryfetch (struct sys_mbox **mb, void **msg) |
void | sys_mbox_free (struct sys_mbox **mb) |
err_t | sys_mbox_new (struct sys_mbox **mb, int size) |
void | sys_mbox_post (struct sys_mbox **mb, void *msg) |
void | sys_mbox_set_invalid (struct sys_mbox **mb) |
err_t | sys_mbox_trypost (struct sys_mbox **mb, void *msg) |
int | sys_mbox_valid (struct sys_mbox **mb) |
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 286 of file sys_arch.c.
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 335 of file sys_arch.c.
void sys_mbox_free | ( | struct sys_mbox ** | mb | ) |
Delete an mbox
mbox | mbox to delete |
Definition at line 193 of file sys_arch.c.
References NULL, and SYS_MBOX_NULL.
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 160 of file sys_arch.c.
void sys_mbox_post | ( | struct sys_mbox ** | mb, |
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 214 of file sys_arch.c.
References head.
void sys_mbox_set_invalid | ( | struct sys_mbox ** | mb | ) |
Set an mbox invalid so that sys_mbox_valid returns 0
Definition at line 374 of file sys_arch.c.
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 250 of file sys_arch.c.
References head.
int sys_mbox_valid | ( | struct sys_mbox ** | mb | ) |
Check if an mbox is valid/allocated: return 1 for valid, 0 for invalid
Definition at line 366 of file sys_arch.c.