diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-07 21:38:18 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-07 21:38:18 +0100 |
commit | 6304c771dd685549bfcd6fe78f29d77876df8a6c (patch) | |
tree | 8e82409e0c0d25d4e1f3a11b0580fa7f65495454 /Kernel/Process.h | |
parent | 03a8357e84a9a7c478d787c4705dddf70dc99f7d (diff) | |
download | serenity-6304c771dd685549bfcd6fe78f29d77876df8a6c.zip |
Some refactor and style tweaks.
Diffstat (limited to 'Kernel/Process.h')
-rw-r--r-- | Kernel/Process.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h index 32c7e803ae..8971007281 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -25,7 +25,7 @@ struct SignalActionData { class Process : public InlineLinkedListNode<Process> { friend class InlineLinkedListNode<Process>; public: - static Process* createKernelProcess(void (*entry)(), String&& name); + static Process* create_kernel_process(void (*entry)(), String&& name); static Process* create_user_process(const String& path, uid_t, gid_t, pid_t ppid, int& error, Vector<String>&& arguments = Vector<String>(), Vector<String>&& environment = Vector<String>(), TTY* = nullptr); ~Process(); @@ -58,8 +58,8 @@ public: bool in_kernel() const { return (m_tss.cs & 0x03) == 0; } - static Process* fromPID(pid_t); - static Process* kernelProcess(); + static Process* from_pid(pid_t); + static Process* colonel_process(); const String& name() const { return m_name; } pid_t pid() const { return m_pid; } @@ -88,9 +88,12 @@ public: void setWakeupTime(DWORD t) { m_wakeupTime = t; } DWORD wakeupTime() const { return m_wakeupTime; } - static void for_each_in_pgrp(pid_t pgid, Function<void(Process&)>); + static void for_each(Function<bool(Process&)>); + static void for_each_in_pgrp(pid_t, Function<bool(Process&)>); + static void for_each_in_state(State, Function<bool(Process&)>); + static void for_each_not_in_state(State, Function<bool(Process&)>); - static void prepForIRETToNewProcess(); + static void prepare_for_iret_to_new_process(); bool tick() { ++m_ticks; return --m_ticksLeft; } void setTicksLeft(DWORD t) { m_ticksLeft = t; } |