summaryrefslogtreecommitdiff
path: root/Kernel/VirtIO/VirtIO.h
diff options
context:
space:
mode:
authorSahan Fernando <sahan.h.fernando@gmail.com>2021-04-18 18:10:34 +1000
committerAndreas Kling <kling@serenityos.org>2021-04-18 13:04:55 +0200
commit45f97c109673acc037c66c9bde7ab22b7c2cf4d8 (patch)
tree2132536c79951c67d0f3e6ad8a6c99c882d251c0 /Kernel/VirtIO/VirtIO.h
parent5c924d395f43ee8f16a9ba8c5007a214ba629a79 (diff)
downloadserenity-45f97c109673acc037c66c9bde7ab22b7c2cf4d8.zip
Kernel: Make VirtIOConsole block when VirtIOQueue is full
Diffstat (limited to 'Kernel/VirtIO/VirtIO.h')
-rw-r--r--Kernel/VirtIO/VirtIO.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/VirtIO/VirtIO.h b/Kernel/VirtIO/VirtIO.h
index fe22e8cc32..e21f1c0bbe 100644
--- a/Kernel/VirtIO/VirtIO.h
+++ b/Kernel/VirtIO/VirtIO.h
@@ -192,6 +192,12 @@ protected:
return m_queues[queue_index];
}
+ const VirtIOQueue& get_queue(u16 queue_index) const
+ {
+ VERIFY(queue_index < m_queue_count);
+ return m_queues[queue_index];
+ }
+
template<typename F>
bool negotiate_features(F f)
{