mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 13:30:31 +00:00
Kernel: Remove Process::all_processes()
This was only used in ProcFS, which can use the `processes()` list just as well, so let's remove it.
This commit is contained in:
parent
81e23617d6
commit
3d0b5efcfc
Notes:
sideshowbarker
2024-07-17 22:01:13 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/3d0b5efcfc0 Pull-request: https://github.com/SerenityOS/serenity/pull/11474 Reviewed-by: https://github.com/bgianfo ✅
3 changed files with 4 additions and 16 deletions
|
@ -533,10 +533,11 @@ private:
|
|||
{
|
||||
{
|
||||
auto array = json.add_array("processes");
|
||||
auto processes = Process::all_processes();
|
||||
build_process(array, *Scheduler::colonel());
|
||||
for (auto& process : processes)
|
||||
build_process(array, process);
|
||||
processes().with([&](auto& processes) {
|
||||
for (auto& process : processes)
|
||||
build_process(array, process);
|
||||
});
|
||||
}
|
||||
|
||||
auto total_time_scheduled = Scheduler::get_total_time_scheduled();
|
||||
|
|
|
@ -79,17 +79,6 @@ UNMAP_AFTER_INIT void Process::initialize()
|
|||
create_signal_trampoline();
|
||||
}
|
||||
|
||||
NonnullRefPtrVector<Process> Process::all_processes()
|
||||
{
|
||||
NonnullRefPtrVector<Process> output;
|
||||
processes().with([&](const auto& list) {
|
||||
output.ensure_capacity(list.size_slow());
|
||||
for (const auto& process : list)
|
||||
output.append(NonnullRefPtr<Process>(process));
|
||||
});
|
||||
return output;
|
||||
}
|
||||
|
||||
bool Process::in_group(GroupID gid) const
|
||||
{
|
||||
return this->gid() == gid || extra_gids().contains_slow(gid);
|
||||
|
|
|
@ -186,8 +186,6 @@ public:
|
|||
bool unref() const;
|
||||
~Process();
|
||||
|
||||
static NonnullRefPtrVector<Process> all_processes();
|
||||
|
||||
RefPtr<Thread> create_kernel_thread(void (*entry)(void*), void* entry_data, u32 priority, NonnullOwnPtr<KString> name, u32 affinity = THREAD_AFFINITY_DEFAULT, bool joinable = true);
|
||||
|
||||
bool is_profiling() const { return m_profiling; }
|
||||
|
|
Loading…
Reference in a new issue