mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-08 09:36:35 +00:00
code.
This commit is contained in:
parent
7932bf483b
commit
d92e0dec22
@ -81,16 +81,13 @@ void sys_mbox_fetch(sys_mbox_t mbox, void **msg)
|
|||||||
if ((timeout) && (timeout<timeouts->next->time)) {
|
if ((timeout) && (timeout<timeouts->next->time)) {
|
||||||
/* If time == SYS_ARCH_TIMEOUT, and we have wait "fetch's timeout" and not "timer's timeout",
|
/* If time == SYS_ARCH_TIMEOUT, and we have wait "fetch's timeout" and not "timer's timeout",
|
||||||
The timeout variable is the number of milliseconds we have waited for the message. */
|
The timeout variable is the number of milliseconds we have waited for the message. */
|
||||||
if (timeout < timeouts->next->time) {
|
|
||||||
timeouts->next->time -= timeout;
|
timeouts->next->time -= timeout;
|
||||||
} else {
|
|
||||||
timeouts->next->time = 0;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* The timeouts->next->time variable is the number of milliseconds we have waited for the message. */
|
/* The timeouts->next->time variable is the number of milliseconds we have waited for the message. */
|
||||||
if (timeouts->next->time < timeout) {
|
if (timeouts->next->time < timeout) {
|
||||||
timeout -= timeouts->next->time;
|
timeout -= timeouts->next->time;
|
||||||
} else {
|
} else {
|
||||||
|
/* either timeout == 0, or timeout must == timeouts->next->time */
|
||||||
if (timeout) timeout = SYS_ARCH_TIMEOUT;
|
if (timeout) timeout = SYS_ARCH_TIMEOUT;
|
||||||
}
|
}
|
||||||
#endif /* LWIP_SO_RCVTIMEO */
|
#endif /* LWIP_SO_RCVTIMEO */
|
||||||
|
Loading…
Reference in New Issue
Block a user