mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 05:10:40 +00:00
sockets: speed up event_callback: don't iterate select_cb_list for NETCONN_EVT_RCVPLUS/SENDPLUS if the socket has been readable/writable before already
This commit is contained in:
parent
58c21eb13c
commit
064044eeae
@ -2049,13 +2049,18 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len)
|
|||||||
/* Set event as required */
|
/* Set event as required */
|
||||||
switch (evt) {
|
switch (evt) {
|
||||||
case NETCONN_EVT_RCVPLUS:
|
case NETCONN_EVT_RCVPLUS:
|
||||||
sock->rcvevent++;
|
if (sock->rcvevent++ > 0) {
|
||||||
|
goto no_select_wakeup;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case NETCONN_EVT_RCVMINUS:
|
case NETCONN_EVT_RCVMINUS:
|
||||||
sock->rcvevent--;
|
sock->rcvevent--;
|
||||||
goto no_select_wakeup;
|
goto no_select_wakeup;
|
||||||
break;
|
break;
|
||||||
case NETCONN_EVT_SENDPLUS:
|
case NETCONN_EVT_SENDPLUS:
|
||||||
|
if (sock->sendevent) {
|
||||||
|
goto no_select_wakeup;
|
||||||
|
}
|
||||||
sock->sendevent = 1;
|
sock->sendevent = 1;
|
||||||
break;
|
break;
|
||||||
case NETCONN_EVT_SENDMINUS:
|
case NETCONN_EVT_SENDMINUS:
|
||||||
|
Loading…
Reference in New Issue
Block a user