On Sep 9 12:21, Takashi Yano wrote: > On Wed, 8 Sep 2021 12:51:31 +0200 > Corinna Vinschen wrote: > > > > Just one question. Would you mind to split your patch into two parts, > > > > one being just the revert of your "Improve select/poll response." patch > > > > and one introducing select_sem? > > > > > > I split the patch as you advised. > > > > Pushed. > > Timing of select_sem notification is fixed by the patch attached. If I'm not entirely off-track, I think this isn't quite right yet. I assume you want to release the semaphore in all cases some bytes have been read or written, right? If so, this should cover the STATUS_THREAD_CANCELED and STATUS_BUFFER_OVERFLOW cases as well. But then again, the ReleaseSemaphore calls are a bit spread out over the calls. I took the liberty to create a followup patch to the attached one. It merges all cases potentially reading or writing some bytes into a single if branch, so only a single ReleaseSemaphore should be required. I dropped STATUS_MORE_ENTRIES because it's not an error, subsumed under NT_SUCCESS, and IIUC, never emitted by the underlying code. I attached the patch to this mail, can you please check it? Thanks, Corinna