1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

Thread: Return a result from block() indicating why the block terminated

And use this to return EINTR in various places; some of which we were
not handling properly before.

This might expose a few bugs in userspace, but should be more compatible
with other POSIX systems, and is certainly a little cleaner.
This commit is contained in:
Robin Burchell 2019-07-20 11:05:52 +02:00 committed by Andreas Kling
parent 56217c7432
commit 833d444cd8
9 changed files with 73 additions and 38 deletions

View file

@ -139,7 +139,9 @@ void SB16::handle_irq()
void SB16::wait_for_irq()
{
current->block_until("Interrupting", [this] {
// Well, we have no way of knowing how much got written. So just hope all of
// it did, even if we're interrupted.
(void)current->block_until("Interrupting", [this] {
return m_interrupted;
});
}