fix(vfs): fix eventfd select

This commit is contained in:
Xu Si Yu 2024-03-08 12:27:10 +08:00
parent 85ae8bfd5a
commit 7155146f9c

View File

@ -106,7 +106,7 @@ static esp_err_t event_start_select(int nfds,
for (int i = 0; i < nfds; i++) { for (int i = 0; i < nfds; i++) {
_lock_acquire_recursive(&s_events[i].lock); _lock_acquire_recursive(&s_events[i].lock);
if (s_events[i].fd == i) { if (s_events[i].fd == i && (FD_ISSET(i, readfds) || FD_ISSET(i, writefds) || FD_ISSET(i, exceptfds))) {
if (s_events[i].support_isr) { if (s_events[i].support_isr) {
portENTER_CRITICAL(&s_events[i].data_spin_lock); portENTER_CRITICAL(&s_events[i].data_spin_lock);
} }