GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
THR_SET_NAME(2) FreeBSD System Calls Manual THR_SET_NAME(2)

thr_set_name
set user-visible thread name

Standard C Library (libc, -lc)

#include <sys/thr.h>

int
thr_set_name(long id, const char *name);

The thr_set_name() system call sets the user-visible name for the thread with the identifier id in the current process to the NUL-terminated string name. The name will be silently truncated to fit into a buffer of MAXCOMLEN + 1 bytes. The thread name can be seen in the output of the ps(1) and top(1) commands, in the kernel debuggers and kernel tracing facility outputs, and in userland debuggers and program core files, as notes.

If successful, thr_set_name() returns zero; otherwise, -1 is returned, and errno is set to indicate the error.

The thr_set_name() system call may return the following errors:
[]
The memory pointed to by the name argument is not valid.
[]
The thread with the identifier id does not exist in the current process.

ps(1), _umtx_op(2), thr_exit(2), thr_kill(2), thr_kill2(2), thr_new(2), thr_self(2), pthread_set_name_np(3), ddb(4), ktr(9)

The thr_set_name() system call is non-standard and is used by the 1:1 Threading Library (libthr, -lthr).

The thr_set_name() system call first appeared in FreeBSD 5.2.
May 5, 2020 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 2 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.