112 LWIP_ASSERT(
"expecting a semaphore count but it's 0", !expectSomething || (*
sem > 1));
123 LWIP_ASSERT(
"expecting a semaphore count but it's 0", !expectSomething || (*
sem > 1));
217 mbox->head = mbox->tail = 0;
219 mbox->q_mem = (
void**)
malloc(
sizeof(
void*)*mboxsize);
220 mbox->size = mboxsize;
223 memset(mbox->q_mem, 0,
sizeof(
void*)*mboxsize);
233 LWIP_ASSERT(
"mbox->sem == mbox", mbox->sem == mbox);
260 q->q_mem[
q->head] =
msg;
262 if (
q->head >= (
unsigned int)
q->size) {
279 if (
q->used ==
q->size) {
313 LWIP_ASSERT(
"expecting item available but it's 0", !expectSomething || (
q->used > 0));
318 }
while(
q->used == 0);
324 LWIP_ASSERT(
"expecting item available count but it's 0", !expectSomething || (
q->used > 0));
355 *
msg =
q->q_mem[
q->tail];
359 if (
q->tail >= (
unsigned int)
q->size) {
367#if LWIP_NETCONN_SEM_PER_THREAD
373 return &global_netconn_sem;
#define LWIP_ASSERT(message, assertion)
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble GLdouble q
#define LWIP_UNUSED_ARG(x)
void sys_mbox_set_invalid(sys_mbox_t *mbox)
u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
void sys_mbox_post(sys_mbox_t *mbox, void *msg)
err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
err_t sys_mbox_new(sys_mbox_t *mbox, int size)
void sys_mbox_free(sys_mbox_t *mbox)
u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio)
void sys_mutex_free(sys_mutex_t *mutex)
err_t sys_mutex_new(sys_mutex_t *mutex)
void sys_mutex_set_invalid(sys_mutex_t *mutex)
void sys_mutex_lock(sys_mutex_t *mutex)
void sys_mutex_unlock(sys_mutex_t *mutex)
void sys_sem_set_invalid(sys_sem_t *sem)
void sys_sem_free(sys_sem_t *sem)
u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
void sys_sem_signal(sys_sem_t *sem)
err_t sys_sem_new(sys_sem_t *sem, u8_t count)
#define sys_mbox_trypost_fromisr
void test_sys_arch_wait_callback(test_sys_arch_waiting_fn waiting_fn)
test_sys_arch_waiting_fn the_waiting_fn
sys_sem_t * sys_arch_netconn_sem_get(void)
int(* test_sys_arch_waiting_fn)(sys_sem_t *wait_sem, sys_mbox_t *wait_mbox)
void sys_arch_netconn_sem_alloc(void)
void sys_arch_netconn_sem_free(void)
void(* lwip_thread_fn)(void *arg)