diff options
author | Andrew Kaster <andrewdkaster@gmail.com> | 2019-12-07 12:45:26 -0700 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-08 14:09:29 +0100 |
commit | 9058962712201336ec5e20638137d3828951950e (patch) | |
tree | 7cdd32c7d2e6c62fc9273fc6ac394eb1695b463e /Kernel/Process.h | |
parent | 875ab0cf107894cf7311ea6d779cdae980e88627 (diff) | |
download | serenity-9058962712201336ec5e20638137d3828951950e.zip |
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.
Diffstat (limited to 'Kernel/Process.h')
-rw-r--r-- | Kernel/Process.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h index bfa31ee58d..ee1c935c28 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -205,6 +205,8 @@ public: void sys$exit_thread(void*); int sys$join_thread(int tid, void** exit_value); int sys$detach_thread(int tid); + int sys$set_thread_name(int tid, const char* buffer, int buffer_size); + int sys$get_thread_name(int tid, char* buffer, int buffer_size); int sys$rename(const char* oldpath, const char* newpath); int sys$systrace(pid_t); int sys$mknod(const char* pathname, mode_t, dev_t); |