diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2020-08-09 15:27:23 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-10 12:52:15 +0200 |
commit | 9652b0ae2b477b2125946a1da974470aec55ef41 (patch) | |
tree | b60da5d296b95d1a315e1c09b491575c16bff216 | |
parent | 0e20a6df0a5d15e1fdf5d4c2e7e8df86a6aabe65 (diff) | |
download | serenity-9652b0ae2b477b2125946a1da974470aec55ef41.zip |
Kernel: Use Userspace<T> for the set_thread_name syscall
-rw-r--r-- | Kernel/Process.h | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/thread.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h index 079a2a1717..fb978f51aa 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -308,7 +308,7 @@ public: void sys$exit_thread(void*); int sys$join_thread(pid_t tid, void** exit_value); int sys$detach_thread(pid_t tid); - int sys$set_thread_name(pid_t tid, const char* buffer, size_t buffer_size); + int sys$set_thread_name(pid_t tid, Userspace<const char*> buffer, size_t buffer_size); int sys$get_thread_name(pid_t tid, char* buffer, size_t buffer_size); int sys$rename(Userspace<const Syscall::SC_rename_params*>); int sys$mknod(Userspace<const Syscall::SC_mknod_params*>); diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp index 35367bdd71..968d7bc453 100644 --- a/Kernel/Syscalls/thread.cpp +++ b/Kernel/Syscalls/thread.cpp @@ -169,7 +169,7 @@ int Process::sys$join_thread(pid_t tid, void** exit_value) return 0; } -int Process::sys$set_thread_name(pid_t tid, const char* user_name, size_t user_name_length) +int Process::sys$set_thread_name(pid_t tid, Userspace<const char*> user_name, size_t user_name_length) { REQUIRE_PROMISE(thread); auto name = validate_and_copy_string_from_user(user_name, user_name_length); @@ -188,6 +188,7 @@ int Process::sys$set_thread_name(pid_t tid, const char* user_name, size_t user_n thread->set_name(name); return 0; } + int Process::sys$get_thread_name(pid_t tid, char* buffer, size_t buffer_size) { REQUIRE_PROMISE(thread); |