Gives a name to the specified thread.
#include <library.h> int setthreadname ( void *threadid, const char *name);
(IN) Points to the ID of a thread obtained by calling getthreadid. If NULL, uses the ID of the thread of the calling process.
(IN) Points to the name for the thread (up to 17 characters).
If successful, returns 0; otherwise, returns EBADHNDL if you pass an invalid thread ID.
The getthreadid, getthreadname, and setthreadname functions are designed to help you debug a multithreaded application. In the debugger, you can see thread names.
These functions can be used on all types of threads: UI, pthread, and NKS.