1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

Kernel: Make Memory::RingBuffer construction fallible

This commit is contained in:
Idan Horowitz 2022-01-20 21:10:46 +02:00 committed by Andreas Kling
parent 9eccd4c56e
commit d65347d39d
4 changed files with 17 additions and 8 deletions

View file

@ -123,8 +123,8 @@ void Console::handle_queue_update(u16 queue_index)
void Console::setup_multiport()
{
m_control_receive_buffer = make<Memory::RingBuffer>("VirtIOConsole control receive queue"sv, CONTROL_BUFFER_SIZE);
m_control_transmit_buffer = make<Memory::RingBuffer>("VirtIOConsole control transmit queue"sv, CONTROL_BUFFER_SIZE);
m_control_receive_buffer = Memory::RingBuffer::try_create("VirtIOConsole control receive queue"sv, CONTROL_BUFFER_SIZE).release_value_but_fixme_should_propagate_errors();
m_control_transmit_buffer = Memory::RingBuffer::try_create("VirtIOConsole control transmit queue"sv, CONTROL_BUFFER_SIZE).release_value_but_fixme_should_propagate_errors();
auto& queue = get_queue(CONTROL_RECEIVEQ);
SpinlockLocker queue_lock(queue.lock());