qthread_worker - Man Page
returns the qthread's current worker ID
Synopsis
#include <qthread.h>
qthread_worker_id_t
qthread_worker (qthread_shepherd_id_t *shep);
Description
This function returns the ID of the worker that the current thread is executing on. If shep is non-NULL, the value of the current shepherd identifier is written to that location.
Note that the current worker ID is transient, and is likely to change, for example, after a call to qthread_yield(). This value is dependent on how many workers are currently active.
Return Value
This function either returns the ID number of the current worker of the calling function, or returns NO_WORKER.
See Also
pthread_getspecific(3), qthread_retloc(3), pthread_shep(3), qthread_stackleft(3), qthread_id(3)
Referenced By
qthread_num_workers(3), qthread_shep(3).
JUNE 2011 libqthread