Table of Contents
qthread_self - retrieve the qthread_t pointer for the current thread
#include <qthread/qthread.h>
qthread_t *
qthread_self(void);
This function allows a qthread to retrieve
its qthread_t pointer.
This often relies on pthread_getspecific(), which
may be slow. On some architectures may cause a context-switch into the kernel.
qthread_self() will return either a pointer to the qthread_t
structure associated with the calling qthread, or if called from a non-qthread
(i.e. a pthread or before qthread_init() has been called), will return NULL.
qthread_id(3)
, qthread_shep(3)
Table of Contents