Lines Matching refs:mbox
209 sys_mbox_new(sys_mbox_t *mbox, int size) in sys_mbox_new() argument
212 LWIP_ASSERT("mbox != NULL", mbox != NULL); in sys_mbox_new()
217 mbox->head = mbox->tail = 0; in sys_mbox_new()
218 mbox->sem = mbox; /* just point to something for sys_mbox_valid() */ in sys_mbox_new()
219 mbox->q_mem = (void**)malloc(sizeof(void*)*mboxsize); in sys_mbox_new()
220 mbox->size = mboxsize; in sys_mbox_new()
221 mbox->used = 0; in sys_mbox_new()
223 memset(mbox->q_mem, 0, sizeof(void*)*mboxsize); in sys_mbox_new()
228 sys_mbox_free(sys_mbox_t *mbox) in sys_mbox_free() argument
231 LWIP_ASSERT("mbox != NULL", mbox != NULL); in sys_mbox_free()
232 LWIP_ASSERT("mbox->sem != NULL", mbox->sem != NULL); in sys_mbox_free()
233 LWIP_ASSERT("mbox->sem == mbox", mbox->sem == mbox); in sys_mbox_free()
234 LWIP_ASSERT("mbox->q_mem != NULL", mbox->q_mem != NULL); in sys_mbox_free()
235 mbox->sem = NULL; in sys_mbox_free()
236 free(mbox->q_mem); in sys_mbox_free()
237 mbox->q_mem = NULL; in sys_mbox_free()
241 sys_mbox_set_invalid(sys_mbox_t *mbox) in sys_mbox_set_invalid() argument
243 LWIP_ASSERT("mbox != NULL", mbox != NULL); in sys_mbox_set_invalid()
244 LWIP_ASSERT("mbox->q_mem == NULL", mbox->q_mem == NULL); in sys_mbox_set_invalid()
245 mbox->sem = NULL; in sys_mbox_set_invalid()
246 mbox->q_mem = NULL; in sys_mbox_set_invalid()