mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
event_callback() handle context switch when calling sys_sem_signal()
This commit is contained in:
parent
b89e10c3e6
commit
d6fbe2a5ad
@ -127,6 +127,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2014-10-21: Simon Goldschmidt (patch by Joel Cunningham and Albert Huitsing)
|
||||||
|
* sockts.c: fixed bugs #41495 Possible threading issue in select() and #43278
|
||||||
|
event_callback() handle context switch when calling sys_sem_signal()
|
||||||
|
|
||||||
2014-10-21: Simon Goldschmidt
|
2014-10-21: Simon Goldschmidt
|
||||||
* api_msg.c: fixed bug #38219 Assert on TCP netconn_write with sndtimeout set
|
* api_msg.c: fixed bug #38219 Assert on TCP netconn_write with sndtimeout set
|
||||||
|
|
||||||
|
@ -1387,6 +1387,8 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len)
|
|||||||
/* At this point, SYS_ARCH is still protected! */
|
/* At this point, SYS_ARCH is still protected! */
|
||||||
again:
|
again:
|
||||||
for (scb = select_cb_list; scb != NULL; scb = scb->next) {
|
for (scb = select_cb_list; scb != NULL; scb = scb->next) {
|
||||||
|
/* remember the state of select_cb_list to detect changes */
|
||||||
|
last_select_cb_ctr = select_cb_ctr;
|
||||||
if (scb->sem_signalled == 0) {
|
if (scb->sem_signalled == 0) {
|
||||||
/* semaphore not signalled yet */
|
/* semaphore not signalled yet */
|
||||||
int do_signal = 0;
|
int do_signal = 0;
|
||||||
@ -1414,7 +1416,6 @@ again:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* unlock interrupts with each step */
|
/* unlock interrupts with each step */
|
||||||
last_select_cb_ctr = select_cb_ctr;
|
|
||||||
SYS_ARCH_UNPROTECT(lev);
|
SYS_ARCH_UNPROTECT(lev);
|
||||||
/* this makes sure interrupt protection time is short */
|
/* this makes sure interrupt protection time is short */
|
||||||
SYS_ARCH_PROTECT(lev);
|
SYS_ARCH_PROTECT(lev);
|
||||||
|
Loading…
Reference in New Issue
Block a user