mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
Kernel: Use Userspace<T> for the set_thread_name syscall
This commit is contained in:
parent
0e20a6df0a
commit
9652b0ae2b
2 changed files with 3 additions and 2 deletions
|
@ -308,7 +308,7 @@ public:
|
||||||
void sys$exit_thread(void*);
|
void sys$exit_thread(void*);
|
||||||
int sys$join_thread(pid_t tid, void** exit_value);
|
int sys$join_thread(pid_t tid, void** exit_value);
|
||||||
int sys$detach_thread(pid_t tid);
|
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$get_thread_name(pid_t tid, char* buffer, size_t buffer_size);
|
||||||
int sys$rename(Userspace<const Syscall::SC_rename_params*>);
|
int sys$rename(Userspace<const Syscall::SC_rename_params*>);
|
||||||
int sys$mknod(Userspace<const Syscall::SC_mknod_params*>);
|
int sys$mknod(Userspace<const Syscall::SC_mknod_params*>);
|
||||||
|
|
|
@ -169,7 +169,7 @@ int Process::sys$join_thread(pid_t tid, void** exit_value)
|
||||||
return 0;
|
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);
|
REQUIRE_PROMISE(thread);
|
||||||
auto name = validate_and_copy_string_from_user(user_name, user_name_length);
|
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);
|
thread->set_name(name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Process::sys$get_thread_name(pid_t tid, char* buffer, size_t buffer_size)
|
int Process::sys$get_thread_name(pid_t tid, char* buffer, size_t buffer_size)
|
||||||
{
|
{
|
||||||
REQUIRE_PROMISE(thread);
|
REQUIRE_PROMISE(thread);
|
||||||
|
|
Loading…
Add table
Reference in a new issue