Expose current worker id to c-files
This commit is contained in:
parent
c8c2822c7b
commit
728c780187
@ -69,6 +69,15 @@ MXS_WORKER* mxs_worker_get(int worker_id);
|
||||
*/
|
||||
int mxs_worker_id(MXS_WORKER* pWorker);
|
||||
|
||||
/**
|
||||
* Return the id of the worker.
|
||||
*
|
||||
* @return The id of the worker.
|
||||
*
|
||||
* @attention If there is no current worker, then -1 will be returned.
|
||||
*/
|
||||
int mxs_worker_get_current_id();
|
||||
|
||||
/**
|
||||
* Post a message to a worker.
|
||||
*
|
||||
|
@ -512,6 +512,11 @@ MXS_WORKER* mxs_worker_get(int worker_id)
|
||||
return Worker::get(worker_id);
|
||||
}
|
||||
|
||||
int mxs_worker_get_current_id()
|
||||
{
|
||||
return Worker::get_current_id();
|
||||
}
|
||||
|
||||
Worker* Worker::get_current()
|
||||
{
|
||||
Worker* pWorker = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user