Assert that buffers are thread-local

Cross-thread usage of buffers should not happen and the debug assertions
help verify it.
This commit is contained in:
Markus Mäkelä
2018-10-01 17:13:53 +03:00
parent 304286e5fa
commit 1ed708559d
2 changed files with 46 additions and 3 deletions

View File

@ -124,6 +124,9 @@ typedef struct gwbuf
BUF_PROPERTY* properties; /*< Buffer properties */
struct server* server; /*< The target server where the buffer is executed */
uint32_t gwbuf_type; /*< buffer's data type information */
#ifdef SS_DEBUG
int owner; /*< Owner of the thread, only for debugging */
#endif
} GWBUF;
/*<