Returns the name of the specified thread.
#include <library.h> int getthreadname ( void *threadid, char *name, size_t maxlen);
(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/OUT) Points to the name for the thread.
(IN) Specifies the length of the name buffer.
If successful, returns 0; otherwise, returns EBADHNDL if you pass an invalid thread ID.