summaryrefslogtreecommitdiff
path: root/Kernel/Net
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-07-04 15:55:20 -0600
committerAndreas Kling <kling@serenityos.org>2020-07-06 10:00:24 +0200
commit788b2d64c66a0741717b638a03baead77856268e (patch)
tree56e6f4fdf9b5e5c8794711e6dc47ddd7a0f13e94 /Kernel/Net
parent0c4b0c0312e32f802103c84d5061351222ee84ec (diff)
downloadserenity-788b2d64c66a0741717b638a03baead77856268e.zip
Kernel: Require a reason to be passed to Thread::wait_on
The Lock class still permits no reason, but for everything else require a reason to be passed to Thread::wait_on. This makes it easier to diagnose why a Thread is in Queued state.
Diffstat (limited to 'Kernel/Net')
-rw-r--r--Kernel/Net/E1000NetworkAdapter.cpp2
-rw-r--r--Kernel/Net/NetworkTask.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/E1000NetworkAdapter.cpp b/Kernel/Net/E1000NetworkAdapter.cpp
index fc6a8058d8..f761c6fa8a 100644
--- a/Kernel/Net/E1000NetworkAdapter.cpp
+++ b/Kernel/Net/E1000NetworkAdapter.cpp
@@ -416,7 +416,7 @@ void E1000NetworkAdapter::send_raw(const u8* data, size_t length)
sti();
break;
}
- Thread::current()->wait_on(m_wait_queue);
+ Thread::current()->wait_on(m_wait_queue, "E1000NetworkAdapter");
}
#ifdef E1000_DEBUG
klog() << "E1000: Sent packet, status is now " << String::format("%b", descriptor.status) << "!";
diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp
index 64863903b6..eb827b6d62 100644
--- a/Kernel/Net/NetworkTask.cpp
+++ b/Kernel/Net/NetworkTask.cpp
@@ -113,7 +113,7 @@ void NetworkTask_main()
for (;;) {
size_t packet_size = dequeue_packet(buffer, buffer_size);
if (!packet_size) {
- Thread::current()->wait_on(packet_wait_queue);
+ Thread::current()->wait_on(packet_wait_queue, "NetworkTask");
continue;
}
if (packet_size < sizeof(EthernetFrameHeader)) {