epoll: Call poll_notify before unlock mutex

to avoid the race condition

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-11 14:53:38 +08:00 committed by Petro Karashchenko
parent 7e8e5c10d1
commit b72be1ddbf
1 changed files with 1 additions and 1 deletions

View File

@ -366,8 +366,8 @@ int epoll_ctl(int epfd, int op, int fd, FAR struct epoll_event *ev)
goto err;
}
nxmutex_unlock(&eph->lock);
poll_notify(&eph->poll, 1, POLLIN);
nxmutex_unlock(&eph->lock);
return OK;
err: