1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

Refactor the FIFO implementation to use a DoubleBuffer as backing store.

This is considerably more efficient than using a CircularQueue.
This commit is contained in:
Andreas Kling 2018-12-03 02:24:11 +01:00
parent afc56d151f
commit 405383fd2f
2 changed files with 7 additions and 15 deletions

View file

@ -1,6 +1,6 @@
#pragma once
#include <AK/CircularQueue.h>
#include "DoubleBuffer.h"
#include <AK/Retainable.h>
#include <AK/RetainPtr.h>
#include <VirtualFileSystem/UnixTypes.h>
@ -27,5 +27,5 @@ private:
unsigned m_writers { 0 };
unsigned m_readers { 0 };
CircularQueue<byte, 16> m_queue;
DoubleBuffer m_buffer;
};