MXS-1378 Provide access to the current DCB in 2.1

Conceptually this is a cherry-pick of commit
67efd1daeabbc398b8a8fbc0cd02c2af26e4cb6c (2.2), but too much has
changed to actually be able to cherry-pick that commit.
This commit is contained in:
Johan Wikman
2017-09-01 13:10:16 +03:00
parent 22ceac6676
commit eff5e7431a
2 changed files with 17 additions and 0 deletions

View File

@ -351,6 +351,14 @@ bool dcb_foreach(bool (*func)(DCB *, void *), void *data);
*/
int dcb_get_port(const DCB *dcb);
/**
* @brief Return the DCB currently being handled by the calling thread.
*
* @return A DCB, or NULL if the calling thread is not currently handling
* a DCB or if the calling thread is not a polling/worker thread.
*/
DCB* dcb_get_current();
/**
* DCB flags values
*/