[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #52719] sys_timeouts synchronization issue with core l
From: |
Joel Cunningham |
Subject: |
[lwip-devel] [bug #52719] sys_timeouts synchronization issue with core locking (NO_SYS == 0) |
Date: |
Tue, 2 Jan 2018 11:03:07 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0 |
Follow-up Comment #2, bug #52719 (project lwip):
Douglas,
Thanks for the attached patch, it looks to correctly solve the core issue. A
couple minor things:
1) The addition of LWIP_ASSERT_CORE_LOCKED in tcpip_tcp_timer,
tcp_timer_needed, and cyclic_timer is not related to this bug, so it would be
better to separate that into another change.
2) In
- if (sleeptime == 0 || sys_arch_mbox_fetch(mbox, msg, sleeptime) ==
SYS_ARCH_TIMEOUT) {
+ if (sleeptime == 0) {
+ sys_check_timeouts();
+ /* We try again to fetch a message from the mbox. */
+ goto again;
+ }
+
+ UNLOCK_TCPIP_CORE();
+ u32_t res = sys_arch_mbox_fetch(mbox, msg, sleeptime);
+ LOCK_TCPIP_CORE();
+ if (res == SYS_ARCH_TIMEOUT) {
You have introduced a declaration (u32_t res) after the first executable
statement in the current scope, which won't compile with C89 (which LwIP
targets)
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?52719>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/