diff options
Diffstat (limited to 'Kernel/DoubleBuffer.h')
-rw-r--r-- | Kernel/DoubleBuffer.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Kernel/DoubleBuffer.h b/Kernel/DoubleBuffer.h index 8bf58f7532..664f2a2308 100644 --- a/Kernel/DoubleBuffer.h +++ b/Kernel/DoubleBuffer.h @@ -18,19 +18,19 @@ class DoubleBuffer { public: explicit DoubleBuffer(size_t capacity = 65536); - [[nodiscard]] ssize_t write(const UserOrKernelBuffer&, size_t); - [[nodiscard]] ssize_t write(const u8* data, size_t size) + [[nodiscard]] KResultOr<size_t> write(const UserOrKernelBuffer&, size_t); + [[nodiscard]] KResultOr<size_t> write(const u8* data, size_t size) { return write(UserOrKernelBuffer::for_kernel_buffer(const_cast<u8*>(data)), size); } - [[nodiscard]] ssize_t read(UserOrKernelBuffer&, size_t); - [[nodiscard]] ssize_t read(u8* data, size_t size) + [[nodiscard]] KResultOr<size_t> read(UserOrKernelBuffer&, size_t); + [[nodiscard]] KResultOr<size_t> read(u8* data, size_t size) { auto buffer = UserOrKernelBuffer::for_kernel_buffer(data); return read(buffer, size); } - [[nodiscard]] ssize_t peek(UserOrKernelBuffer&, size_t); - [[nodiscard]] ssize_t peek(u8* data, size_t size) + [[nodiscard]] KResultOr<size_t> peek(UserOrKernelBuffer&, size_t); + [[nodiscard]] KResultOr<size_t> peek(u8* data, size_t size) { auto buffer = UserOrKernelBuffer::for_kernel_buffer(data); return peek(buffer, size); |