Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
pthread_setname_np()
Name a thread
Synopsis:
#include <pthread.h>
int pthread_setname_np(pthread_t tid,
const char* newname);
Arguments:
- tid
- The ID of the thread you want to name.
- newname
- NULL, or a NULL-terminated string that specifies the new name.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The pthread_setname_np() function sets the name of the specified thread to newname. If newname is NULL, the function deletes any name already assigned to the thread. The "np" in the function's name stands for "non-POSIX."
![]() |
This function was added in the QNX Neutrino Core OS 6.3.2. |
Returns:
- EOK
- Success.
- E2BIG
- The name is larger than the accepted size.
- EINVAL
- The name buffer length is invalid or smaller that the new name length.
- EPERM
- The process doesn't have superuser capabilities.
Classification:
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
See also:
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
