summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2012-02-21 22:15:44 +0100
committerunknown <knielsen@knielsen-hq.org>2012-02-21 22:15:44 +0100
commitf6b68a10707c95e24f67d338eaaa03f1bd575598 (patch)
treebd7748f0d0a239145e4c02b223f523b4c571aacb /dbug
parent4b9907979ce316be12a7ce2b62874b42edf2e39e (diff)
parent7c8ebb532eef543a9b98107c164a12a49e28d0ca (diff)
downloadmariadb-git-f6b68a10707c95e24f67d338eaaa03f1bd575598.tar.gz
Merge MWL#192: Non-blocking client library, into MariaDB 5.5.
Diffstat (limited to 'dbug')
-rw-r--r--dbug/dbug.c21
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.
*/