mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
Kernel: Allow setting thread names
The main thread of each kernel/user process will take the name of the process. Extra threads will get a fancy new name "ProcessName[<tid>]". Thread backtraces now list the thread name in addtion to tid. Add the thread name to /proc/all (should it get its own proc file?). Add two new syscalls, set_thread_name and get_thread_name.
This commit is contained in:
parent
875ab0cf10
commit
9058962712
6 changed files with 78 additions and 2 deletions
|
@ -73,6 +73,9 @@ public:
|
|||
|
||||
String backtrace(ProcessInspectionHandle&) const;
|
||||
|
||||
const String& name() const { return m_name; }
|
||||
void set_name(StringView s) { m_name = s; }
|
||||
|
||||
void finalize();
|
||||
|
||||
enum State : u8 {
|
||||
|
@ -463,6 +466,7 @@ private:
|
|||
|
||||
FPUState* m_fpu_state { nullptr };
|
||||
State m_state { Invalid };
|
||||
String m_name;
|
||||
ThreadPriority m_priority { ThreadPriority::Normal };
|
||||
bool m_has_used_fpu { false };
|
||||
bool m_dump_backtrace_on_finalization { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue