mbox->wait_send--;
}
- mbox->msgs[mbox->rear] = msg;
- LWIP_DEBUGF(SYS_DEBUG, ("Post SUCCESS\n"));
if (mbox->rear == mbox->front) {
first_msg = 1;
} else {
}
mbox->rear = tmp;
+ mbox->msgs[mbox->rear] = msg;
+ LWIP_DEBUGF(SYS_DEBUG, ("Post SUCCESS\n"));
/* If msg was posted to an empty queue, Release semaphore for
some fetch api blocked on this sem due to Empty queue. */
goto errout_with_mutex;
}
- mbox->msgs[mbox->rear] = msg;
- LWIP_DEBUGF(SYS_DEBUG, ("Post SUCCESS\n"));
if (mbox->rear == mbox->front) {
first_msg = 1;
} else {
}
mbox->rear = tmp;
+ mbox->msgs[mbox->rear] = msg;
+ LWIP_DEBUGF(SYS_DEBUG, ("Post SUCCESS\n"));
/* If msg was posted to an empty queue, Release semaphore for
some fetch api blocked on this sem due to Empty queue. */
mbox->wait_fetch--;
}
+ mbox->front = (mbox->front + 1) % mbox->queue_size;
if (msg != NULL) {
*msg = mbox->msgs[mbox->front];
LWIP_DEBUGF(SYS_DEBUG, (" mbox %p msg %p\n", (void *)mbox, *msg));
LWIP_DEBUGF(SYS_DEBUG, (" mbox %p, null msg\n", (void *)mbox));
}
- mbox->front = (mbox->front + 1) % mbox->queue_size;
-
/* We just fetched a msg, Release semaphore for
some post api blocked on this sem due to queue full. */
if (mbox->wait_send) {
goto errout_with_mutex;
}
+ mbox->front = (mbox->front + 1) % mbox->queue_size;
if (msg != NULL) {
LWIP_DEBUGF(SYS_DEBUG, ("mbox %p msg %p\n", (void *)mbox, *msg));
*msg = mbox->msgs[mbox->front];
LWIP_DEBUGF(SYS_DEBUG, ("mbox %p, null msg\n", (void *)mbox));
}
- mbox->front = (mbox->front + 1) % mbox->queue_size;
-
/* We just fetched a msg, Release semaphore for
some post api blocked on this sem due to queue full. */
if (mbox->wait_send) {