diff options
author | unknown <knielsen@knielsen-hq.org> | 2012-02-21 22:15:44 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2012-02-21 22:15:44 +0100 |
commit | f6b68a10707c95e24f67d338eaaa03f1bd575598 (patch) | |
tree | bd7748f0d0a239145e4c02b223f523b4c571aacb /dbug | |
parent | 4b9907979ce316be12a7ce2b62874b42edf2e39e (diff) | |
parent | 7c8ebb532eef543a9b98107c164a12a49e28d0ca (diff) | |
download | mariadb-git-f6b68a10707c95e24f67d338eaaa03f1bd575598.tar.gz |
Merge MWL#192: Non-blocking client library, into MariaDB 5.5.
Diffstat (limited to 'dbug')
-rw-r--r-- | dbug/dbug.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c index 8b3927d2427..eb7a0e9c4b6 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -349,6 +349,27 @@ static CODE_STATE *code_state(void) return cs; } +void +dbug_swap_code_state(void **code_state_store) +{ + CODE_STATE *cs, **cs_ptr; + + if (!(cs_ptr= (CODE_STATE**) my_thread_var_dbug())) + return; + cs= *cs_ptr; + *cs_ptr= *code_state_store; + *code_state_store= cs; +} + +void dbug_free_code_state(void **code_state_store) +{ + if (*code_state_store) + { + free(*code_state_store); + *code_state_store= NULL; + } +} + /* * Translate some calls among different systems. */ |