Updated: April 19, 2023 |
Retrieve the name of a thread
#include <pthread.h> int pthread_getname_np(pthread_t tid, char* buffer, int buffersize);
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The pthread_getname_np() function retrieves the name of the specified thread as a NULL-terminated string up to a maximum size (as determined by the buffersize). If the thread doesn't have a name, the function stores a NULL-terminated empty string in the buffer. The np in the function's name stands for non-POSIX.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |