Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_getname_np.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_getname_np.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_getname_np.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_getname_np.html on line 8

pthread_getname_np()

Retrieve the name of a thread

Synopsis:

#include <pthread.h>

int pthread_getname_np(pthread_t tid,
                       char* buffer,
                       int buffersize);

Arguments:

tid
The ID of the thread whose name you want to get, or 0 to get the name of the calling thread.
buffer
A storage place for the name.
buffersize
The size of the buffer, in bytes.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

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.”


Note: This function was added in the QNX Neutrino Core OS 6.3.2.

Returns:

EOK
Success.
EINVAL
The name buffer length is invalid or smaller than the new name length.
EPERM
You don't have the appropriate permissions to get the name.

Classification:

QNX Neutrino

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pthread_setname_np()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_getname_np.html on line 150

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_getname_np.html on line 150