1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-19 21:40:49 +00:00

Rename task_ctl to task_queue_ctl

This commit is contained in:
twinaphex 2016-02-09 17:51:51 +01:00
parent 08eb091610
commit 6e9bc55dd6
9 changed files with 19 additions and 19 deletions

@ -2826,9 +2826,9 @@ void general_write_handler(void *data)
case MENU_LABEL_VIDEO_THREADED: case MENU_LABEL_VIDEO_THREADED:
{ {
if (*setting->value.boolean) if (*setting->value.boolean)
task_ctl(TASK_CTL_SET_THREADED, NULL); task_queue_ctl(TASK_CTL_SET_THREADED, NULL);
else else
task_ctl(TASK_CTL_UNSET_THREADED, NULL); task_queue_ctl(TASK_CTL_UNSET_THREADED, NULL);
} }
break; break;
case MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR: case MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR:

@ -439,7 +439,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
switch (state) switch (state)
{ {
case RUNLOOP_CTL_DATA_ITERATE: case RUNLOOP_CTL_DATA_ITERATE:
task_ctl(TASK_CTL_CHECK, NULL); task_queue_ctl(TASK_CTL_CHECK, NULL);
return true; return true;
case RUNLOOP_CTL_SHADER_DIR_DEINIT: case RUNLOOP_CTL_SHADER_DIR_DEINIT:
shader_dir_free(&runloop_shader_dir); shader_dir_free(&runloop_shader_dir);
@ -973,7 +973,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
case RUNLOOP_CTL_TASK_INIT: case RUNLOOP_CTL_TASK_INIT:
{ {
bool threaded_enable = settings->threaded_data_runloop_enable; bool threaded_enable = settings->threaded_data_runloop_enable;
task_ctl(TASK_CTL_INIT, &threaded_enable); task_queue_ctl(TASK_CTL_INIT, &threaded_enable);
} }
break; break;
case RUNLOOP_CTL_PREPARE_DUMMY: case RUNLOOP_CTL_PREPARE_DUMMY:
@ -1011,7 +1011,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
case RUNLOOP_CTL_IS_EXEC: case RUNLOOP_CTL_IS_EXEC:
return runloop_exec; return runloop_exec;
case RUNLOOP_CTL_DATA_DEINIT: case RUNLOOP_CTL_DATA_DEINIT:
task_ctl(TASK_CTL_DEINIT, NULL); task_queue_ctl(TASK_CTL_DEINIT, NULL);
break; break;
case RUNLOOP_CTL_IS_CORE_OPTION_UPDATED: case RUNLOOP_CTL_IS_CORE_OPTION_UPDATED:
if (!runloop_system.core_options) if (!runloop_system.core_options)

@ -607,7 +607,7 @@ bool rarch_task_push_dbscan(const char *fullpath,
if (db->handle) if (db->handle)
db->handle->status = DATABASE_STATUS_ITERATE_BEGIN; db->handle->status = DATABASE_STATUS_ITERATE_BEGIN;
task_ctl(TASK_CTL_PUSH, t); task_queue_ctl(TASK_CTL_PUSH, t);
return true; return true;

@ -266,7 +266,7 @@ bool rarch_task_push_decompress(
find_data.func = rarch_task_decompress_finder; find_data.func = rarch_task_decompress_finder;
find_data.userdata = (void*)source_file; find_data.userdata = (void*)source_file;
if (task_ctl(TASK_CTL_FIND, &find_data)) if (task_queue_ctl(TASK_CTL_FIND, &find_data))
{ {
RARCH_LOG("[decompress] File '%s' already being decompressed.\n", RARCH_LOG("[decompress] File '%s' already being decompressed.\n",
source_file); source_file);
@ -313,7 +313,7 @@ bool rarch_task_push_decompress(
t->title = strdup(tmp); t->title = strdup(tmp);
task_ctl(TASK_CTL_PUSH, t); task_queue_ctl(TASK_CTL_PUSH, t);
return true; return true;

@ -364,7 +364,7 @@ bool rarch_task_push_image_load(const char *fullpath,
t->callback = cb; t->callback = cb;
t->user_data = user_data; t->user_data = user_data;
task_ctl(TASK_CTL_PUSH, t); task_queue_ctl(TASK_CTL_PUSH, t);
#endif #endif
return true; return true;
} }

@ -226,7 +226,7 @@ bool rarch_task_push_http_transfer(const char *url, const char *type,
find_data.userdata = (void*)url; find_data.userdata = (void*)url;
/* Concurrent download of the same file is not allowed */ /* Concurrent download of the same file is not allowed */
if (task_ctl(TASK_CTL_FIND, &find_data)) if (task_queue_ctl(TASK_CTL_FIND, &find_data))
{ {
RARCH_LOG("[http] '%s'' is already being downloaded.\n", url); RARCH_LOG("[http] '%s'' is already being downloaded.\n", url);
return false; return false;
@ -265,7 +265,7 @@ bool rarch_task_push_http_transfer(const char *url, const char *type,
t->title = strdup(tmp); t->title = strdup(tmp);
task_ctl(TASK_CTL_PUSH, t); task_queue_ctl(TASK_CTL_PUSH, t);
return true; return true;

@ -732,7 +732,7 @@ static bool rarch_task_push_overlay_load(const char *overlay_path,
t->callback = cb; t->callback = cb;
t->user_data = user_data; t->user_data = user_data;
task_ctl(TASK_CTL_PUSH, t); task_queue_ctl(TASK_CTL_PUSH, t);
return true; return true;
error: error:

@ -330,7 +330,7 @@ static struct retro_task_impl impl_threaded = {
}; };
#endif #endif
bool task_ctl(enum task_ctl_state state, void *data) bool task_queue_ctl(enum task_queue_ctl_state state, void *data)
{ {
static struct retro_task_impl *impl_current = NULL; static struct retro_task_impl *impl_current = NULL;
static bool task_threaded_enable = false; static bool task_threaded_enable = false;
@ -358,7 +358,7 @@ bool task_ctl(enum task_ctl_state state, void *data)
#ifdef HAVE_THREADS #ifdef HAVE_THREADS
if (*boolean_val) if (*boolean_val)
{ {
task_ctl(TASK_CTL_SET_THREADED, NULL); task_queue_ctl(TASK_CTL_SET_THREADED, NULL);
impl_current = &impl_threaded; impl_current = &impl_threaded;
} }
#endif #endif
@ -377,13 +377,13 @@ bool task_ctl(enum task_ctl_state state, void *data)
{ {
#ifdef HAVE_THREADS #ifdef HAVE_THREADS
bool current_threaded = (impl_current == &impl_threaded); bool current_threaded = (impl_current == &impl_threaded);
bool want_threaded = task_ctl(TASK_CTL_IS_THREADED, NULL); bool want_threaded = task_queue_ctl(TASK_CTL_IS_THREADED, NULL);
if (want_threaded != current_threaded) if (want_threaded != current_threaded)
task_ctl(TASK_CTL_DEINIT, NULL); task_queue_ctl(TASK_CTL_DEINIT, NULL);
if (!impl_current) if (!impl_current)
task_ctl(TASK_CTL_INIT, NULL); task_queue_ctl(TASK_CTL_INIT, NULL);
#endif #endif
impl_current->gather(); impl_current->gather();

@ -24,7 +24,7 @@
extern "C" { extern "C" {
#endif #endif
enum task_ctl_state enum task_queue_ctl_state
{ {
TASK_CTL_NONE = 0, TASK_CTL_NONE = 0,
@ -140,7 +140,7 @@ typedef struct task_finder_data
void push_task_progress(retro_task_t *task); void push_task_progress(retro_task_t *task);
bool task_ctl(enum task_ctl_state state, void *data); bool task_queue_ctl(enum task_queue_ctl_state state, void *data);
#ifdef __cplusplus #ifdef __cplusplus
} }