From 744e84302311df9eec9452936a26b16d8649c384 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 12 Feb 2024 18:55:23 +0100 Subject: Add documentation for thread_set_name --- doc/mach.texi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/mach.texi b/doc/mach.texi index d0f56eca..f85288e0 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -4427,6 +4427,17 @@ The last processor used by the thread. This is a pointer to a @code{struct thread_sched_info}. @end deftp +@deftypefun kern_return_t thread_set_name (@w{thread_t @var{target_thread}}, @w{const_kernel_debug_name_t @var{name}}) + +The function @code{thread_set_name} sets the name of @var{target_thread} +to @var{name}, truncating it if necessary. + +This is a debugging aid. The name is used in diagnostic messages +printed by the kernel. + +The function returns @code{KERN_SUCCESS} if the call succeeded. +@end deftypefun + @node Thread Settings @subsection Thread Settings -- cgit v1.2.3