1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:55:09 +00:00

Kernel: Implement FIFOs/named pipes

This commit is contained in:
Peter Elliott 2020-07-16 15:23:03 -06:00 committed by Andreas Kling
parent 76e34968fa
commit d01eba6fa3
5 changed files with 69 additions and 0 deletions

View file

@ -205,6 +205,18 @@ void Inode::unregister_watcher(Badge<InodeWatcher>, InodeWatcher& watcher)
m_watchers.remove(&watcher);
}
FIFO& Inode::fifo()
{
ASSERT(metadata().is_fifo());
// FIXME: Release m_fifo when it is closed by all readers and writers
if (!m_fifo)
m_fifo = FIFO::create(metadata().uid);
ASSERT(m_fifo);
return *m_fifo;
}
void Inode::set_metadata_dirty(bool metadata_dirty)
{
if (m_metadata_dirty == metadata_dirty)