summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/GlobalProcessExposed.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/Kernel/GlobalProcessExposed.cpp b/Kernel/GlobalProcessExposed.cpp
index a0acdb0778..d4a984e71c 100644
--- a/Kernel/GlobalProcessExposed.cpp
+++ b/Kernel/GlobalProcessExposed.cpp
@@ -582,23 +582,20 @@ private:
return {};
};
- SpinlockLocker lock(g_scheduler_lock);
{
- {
- auto array = TRY(json.add_array("processes"sv));
- TRY(build_process(array, *Scheduler::colonel()));
- TRY(Process::all_instances().with([&](auto& processes) -> ErrorOr<void> {
- for (auto& process : processes)
- TRY(build_process(array, process));
- return {};
- }));
- TRY(array.finish());
- }
-
- auto total_time_scheduled = Scheduler::get_total_time_scheduled();
- TRY(json.add("total_time"sv, total_time_scheduled.total));
- TRY(json.add("total_time_kernel"sv, total_time_scheduled.total_kernel));
+ auto array = TRY(json.add_array("processes"sv));
+ TRY(build_process(array, *Scheduler::colonel()));
+ TRY(Process::all_instances().with([&](auto& processes) -> ErrorOr<void> {
+ for (auto& process : processes)
+ TRY(build_process(array, process));
+ return {};
+ }));
+ TRY(array.finish());
}
+
+ auto total_time_scheduled = Scheduler::get_total_time_scheduled();
+ TRY(json.add("total_time"sv, total_time_scheduled.total));
+ TRY(json.add("total_time_kernel"sv, total_time_scheduled.total_kernel));
TRY(json.finish());
return {};
}