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:
parent
56217c7432
commit
833d444cd8
9 changed files with 73 additions and 38 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue