diff options
Diffstat (limited to 'Kernel/DoubleBuffer.h')
-rw-r--r-- | Kernel/DoubleBuffer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/DoubleBuffer.h b/Kernel/DoubleBuffer.h index e7212a5f8a..fc351a65c8 100644 --- a/Kernel/DoubleBuffer.h +++ b/Kernel/DoubleBuffer.h @@ -13,13 +13,13 @@ public: { } - ssize_t write(const byte*, size_t); - ssize_t read(byte*, size_t); + ssize_t write(const byte*, ssize_t); + ssize_t read(byte*, ssize_t); bool is_empty() const { return m_empty; } // FIXME: Isn't this racy? What if we get interrupted between getting the buffer pointer and dereferencing it? - size_t bytes_in_write_buffer() const { return m_write_buffer->size(); } + ssize_t bytes_in_write_buffer() const { return (ssize_t)m_write_buffer->size(); } private: void flip(); @@ -29,7 +29,7 @@ private: Vector<byte>* m_read_buffer { nullptr }; Vector<byte> m_buffer1; Vector<byte> m_buffer2; - size_t m_read_buffer_index { 0 }; + ssize_t m_read_buffer_index { 0 }; bool m_empty { true }; Lock m_lock; }; |