On Fri Jan 24 19:19:47 2025 +0000, William Horvath wrote:
I assume the main problem with this patch is due to this check here. While this works correctly for now with how `server_wait` is used, it's just an extra thing to be careful about in the future. However, the other options I considered also had tradeoffs:
- Add an argument to `server_wait` to signal if we want the return value
of the yield (best alternative)
- Just yield again in `NtDelayExecution` itself, ignoring the fact that
we already yielded, and return the result there like we do for the non-alertable case (second best alternative)
- Move the yield outside of `server_wait` and duplicate it everywhere
`server_wait` is called (terrible) Maybe there's something else to consider, but the current version isn't so bad if you take these alternatives into account.
Detecting special case for NtDelayExecution based on select_op in server_select() is not particularly nice, maybe would be better to return yield status from server_wait() and handle everything in NtDelayExecution?