mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 15:28:55 +00:00
Waiters should be notified when a waitee is killed.
Ran into a horrendous bug where VirtualConsole would overrun its buffer and scribble right into some other object if we were interrupted while processing a character. Slapped an InterruptDisabler onto onChar for now. This provokes an interesting question though.. if a process is killed while its in kernel space, how the heck do we release any locks it held? I'm sure there are many different solutions to this problem, but I'll have to think about it.
This commit is contained in:
parent
9a086b2d35
commit
a685809e75
Notes:
sideshowbarker
2024-07-19 18:35:24 +09:00
Author: https://github.com/awesomekling
Commit: a685809e75
7 changed files with 36 additions and 8 deletions
|
@ -558,11 +558,13 @@ InodeIdentifier VirtualFileSystem::resolvePath(const String& path, int& error, I
|
|||
|
||||
void VirtualFileSystem::Node::retain()
|
||||
{
|
||||
InterruptDisabler disabler; // FIXME: Make a Retainable with atomic retain count instead.
|
||||
++retainCount;
|
||||
}
|
||||
|
||||
void VirtualFileSystem::Node::release()
|
||||
{
|
||||
InterruptDisabler disabler; // FIXME: Make a Retainable with atomic retain count instead.
|
||||
ASSERT(retainCount);
|
||||
if (--retainCount == 0) {
|
||||
m_vfs->freeNode(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue