New empth_name() and empth_set_name()

This commit is contained in:
Ron Koenderink 2008-09-11 14:46:31 -06:00
parent 2e5915dd09
commit 2ddeda99d0
6 changed files with 88 additions and 0 deletions

View file

@ -486,6 +486,27 @@ empth_self(void)
return pThread;
}
/************************
* empth_name
*/
char *
empth_name(void)
{
return empth_self()->szName;
}
/************************
* empth_set_name
* Set the thread name
*/
void
empth_set_name(char *name)
{
empth_t *pThread = TlsGetValue(dwTLSIndex);
strncpy(pThread->szName, name, sizeof(pThread->szName) - 1);
}
/************************
* empth_exit
*/