mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +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
|
@ -721,6 +721,7 @@ Optional<KBuffer> procfs$all(InodeIdentifier)
|
|||
process.for_each_thread([&](const Thread& thread) {
|
||||
auto thread_object = thread_array.add_object();
|
||||
thread_object.add("tid", thread.tid());
|
||||
thread_object.add("name", thread.name());
|
||||
thread_object.add("times_scheduled", thread.times_scheduled());
|
||||
thread_object.add("ticks", thread.ticks());
|
||||
thread_object.add("state", thread.state_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue