diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-08-25 12:40:09 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-08-25 12:40:09 +0200 |
commit | 6b1863b8304662189a3b9a4aef1e1bebef035b86 (patch) | |
tree | 48ba2cbdda863b644108e93ace3668333ae0d193 /mysys | |
parent | ea91bb6801b1b619d64fa137ea351eca9de683ec (diff) | |
parent | 5bbe929d706e26cb3f9b291da6009526a17b1545 (diff) | |
download | mariadb-git-6b1863b8304662189a3b9a4aef1e1bebef035b86.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_context.c | 17 | ||||
-rw-r--r-- | mysys/my_error.c | 2 |
2 files changed, 8 insertions, 11 deletions
diff --git a/mysys/my_context.c b/mysys/my_context.c index e4ca4143baf..017cebdc110 100644 --- a/mysys/my_context.c +++ b/mysys/my_context.c @@ -696,30 +696,27 @@ my_context_destroy(struct my_context *c) int my_context_spawn(struct my_context *c, void (*f)(void *), void *d) { - void *current_fiber; c->user_func= f; c->user_arg= d; + return my_context_continue(c); +} + +int +my_context_continue(struct my_context *c) +{ /* This seems to be a common trick to run ConvertThreadToFiber() only on the first occurence in a thread, in a way that works on multiple Windows versions. */ - current_fiber= GetCurrentFiber(); + void *current_fiber= GetCurrentFiber(); if (current_fiber == NULL || current_fiber == (void *)0x1e00) current_fiber= ConvertThreadToFiber(c); c->app_fiber= current_fiber; DBUG_SWAP_CODE_STATE(&c->dbug_state); SwitchToFiber(c->lib_fiber); DBUG_SWAP_CODE_STATE(&c->dbug_state); - return c->return_value; -} -int -my_context_continue(struct my_context *c) -{ - DBUG_SWAP_CODE_STATE(&c->dbug_state); - SwitchToFiber(c->lib_fiber); - DBUG_SWAP_CODE_STATE(&c->dbug_state); return c->return_value; } diff --git a/mysys/my_error.c b/mysys/my_error.c index 5d16091e0be..44d112bc049 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -217,7 +217,7 @@ void my_message(uint error, const char *str, register myf MyFlags) @retval != 0 Error */ -int my_error_register(const char** (*get_errmsgs) (), uint first, uint last) +int my_error_register(const char** (*get_errmsgs) (void), uint first, uint last) { struct my_err_head *meh_p; struct my_err_head **search_meh_pp; |