RetroArch
Classes | Macros | Functions | Variables
task_queue.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <queues/task_queue.h>
Include dependency graph for task_queue.c:

Classes

struct  task_queue_t
 
struct  retro_task_impl
 

Macros

#define SLOCK_LOCK(x)
 
#define SLOCK_UNLOCK(x)
 

Functions

static void task_queue_msg_push (retro_task_t *task, unsigned prio, unsigned duration, bool flush, const char *fmt,...)
 
static void task_queue_push_progress (retro_task_t *task)
 
static void task_queue_put (task_queue_t *queue, retro_task_t *task)
 
static retro_task_ttask_queue_get (task_queue_t *queue)
 
static void retro_task_internal_gather (void)
 
static void retro_task_regular_push_running (retro_task_t *task)
 
static void retro_task_regular_cancel (void *task)
 
static void retro_task_regular_gather (void)
 
static void retro_task_regular_wait (retro_task_condition_fn_t cond, void *data)
 
static void retro_task_regular_reset (void)
 
static void retro_task_regular_init (void)
 
static void retro_task_regular_deinit (void)
 
static bool retro_task_regular_find (retro_task_finder_t func, void *user_data)
 
static void retro_task_regular_retrieve (task_retriever_data_t *data)
 
void task_queue_deinit (void)
 
void task_queue_init (bool threaded, retro_task_queue_msg_t msg_push)
 
void task_queue_set_threaded (void)
 
void task_queue_unset_threaded (void)
 
bool task_queue_is_threaded (void)
 
bool task_queue_find (task_finder_data_t *find_data)
 
void task_queue_retrieve (task_retriever_data_t *data)
 
void task_queue_check (void)
 
void task_queue_push (retro_task_t *task)
 
void task_queue_wait (retro_task_condition_fn_t cond, void *data)
 
void task_queue_reset (void)
 
void task_queue_cancel_task (void *task)
 
voidtask_queue_retriever_info_next (task_retriever_info_t **link)
 
void task_queue_retriever_info_free (task_retriever_info_t *list)
 
void task_set_finished (retro_task_t *task, bool finished)
 
void task_set_mute (retro_task_t *task, bool mute)
 
void task_set_error (retro_task_t *task, char *error)
 
void task_set_progress (retro_task_t *task, int8_t progress)
 
void task_set_title (retro_task_t *task, char *title)
 
void task_set_data (retro_task_t *task, void *data)
 
void task_set_cancelled (retro_task_t *task, bool cancelled)
 
void task_free_title (retro_task_t *task)
 
voidtask_get_data (retro_task_t *task)
 
bool task_get_cancelled (retro_task_t *task)
 
bool task_get_finished (retro_task_t *task)
 
bool task_get_mute (retro_task_t *task)
 
char * task_get_error (retro_task_t *task)
 
int8_t task_get_progress (retro_task_t *task)
 
char * task_get_title (retro_task_t *task)
 

Variables

static retro_task_queue_msg_t msg_push_bak
 
static task_queue_t tasks_running = {NULL, NULL}
 
static task_queue_t tasks_finished = {NULL, NULL}
 
static struct retro_task_implimpl_current = NULL
 
static bool task_threaded_enable = false
 
static struct retro_task_impl impl_regular
 

Macro Definition Documentation

◆ SLOCK_LOCK

#define SLOCK_LOCK (   x)

◆ SLOCK_UNLOCK

#define SLOCK_UNLOCK (   x)

Function Documentation

◆ retro_task_internal_gather()

static void retro_task_internal_gather ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retro_task_regular_cancel()

static void retro_task_regular_cancel ( void task)
static

◆ retro_task_regular_deinit()

static void retro_task_regular_deinit ( void  )
static

◆ retro_task_regular_find()

static bool retro_task_regular_find ( retro_task_finder_t  func,
void user_data 
)
static

◆ retro_task_regular_gather()

static void retro_task_regular_gather ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retro_task_regular_init()

static void retro_task_regular_init ( void  )
static

◆ retro_task_regular_push_running()

static void retro_task_regular_push_running ( retro_task_t task)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retro_task_regular_reset()

static void retro_task_regular_reset ( void  )
static

◆ retro_task_regular_retrieve()

static void retro_task_regular_retrieve ( task_retriever_data_t data)
static
Here is the call graph for this function:

◆ retro_task_regular_wait()

static void retro_task_regular_wait ( retro_task_condition_fn_t  cond,
void data 
)
static
Here is the call graph for this function:

◆ task_free_title()

void task_free_title ( retro_task_t task)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_get_cancelled()

bool task_get_cancelled ( retro_task_t task)
Here is the caller graph for this function:

◆ task_get_data()

void* task_get_data ( retro_task_t task)

◆ task_get_error()

char* task_get_error ( retro_task_t task)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_get_finished()

bool task_get_finished ( retro_task_t task)
Here is the caller graph for this function:

◆ task_get_mute()

bool task_get_mute ( retro_task_t task)
Here is the caller graph for this function:

◆ task_get_progress()

int8_t task_get_progress ( retro_task_t task)
Here is the caller graph for this function:

◆ task_get_title()

char* task_get_title ( retro_task_t task)

◆ task_queue_cancel_task()

void task_queue_cancel_task ( void task)

Signals a task to end without waiting for it to complete.

Here is the caller graph for this function:

◆ task_queue_check()

void task_queue_check ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_queue_deinit()

void task_queue_deinit ( void  )
Here is the caller graph for this function:

◆ task_queue_find()

bool task_queue_find ( task_finder_data_t find_data)

Calls func for every running task until it returns true. Returns a task or NULL if not found.

Here is the caller graph for this function:

◆ task_queue_get()

static retro_task_t* task_queue_get ( task_queue_t queue)
static
Here is the caller graph for this function:

◆ task_queue_init()

void task_queue_init ( bool  threaded,
retro_task_queue_msg_t  msg_push 
)
Here is the caller graph for this function:

◆ task_queue_is_threaded()

bool task_queue_is_threaded ( void  )
Here is the caller graph for this function:

◆ task_queue_msg_push()

static void task_queue_msg_push ( retro_task_t task,
unsigned  prio,
unsigned  duration,
bool  flush,
const char *  fmt,
  ... 
)
static
Here is the caller graph for this function:

◆ task_queue_push()

void task_queue_push ( retro_task_t task)
Here is the caller graph for this function:

◆ task_queue_push_progress()

static void task_queue_push_progress ( retro_task_t task)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_queue_put()

static void task_queue_put ( task_queue_t queue,
retro_task_t task 
)
static
Here is the caller graph for this function:

◆ task_queue_reset()

void task_queue_reset ( void  )

◆ task_queue_retrieve()

void task_queue_retrieve ( task_retriever_data_t data)

Calls func for every running task when handler parameter matches task handler, allowing the list parameter to be filled with user-defined data.

Here is the caller graph for this function:

◆ task_queue_retriever_info_free()

void task_queue_retriever_info_free ( task_retriever_info_t list)
Here is the call graph for this function:

◆ task_queue_retriever_info_next()

void* task_queue_retriever_info_next ( task_retriever_info_t **  link)
Here is the call graph for this function:

◆ task_queue_set_threaded()

void task_queue_set_threaded ( void  )
Here is the caller graph for this function:

◆ task_queue_unset_threaded()

void task_queue_unset_threaded ( void  )
Here is the caller graph for this function:

◆ task_queue_wait()

void task_queue_wait ( retro_task_condition_fn_t  cond,
void data 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_set_cancelled()

void task_set_cancelled ( retro_task_t task,
bool  cancelled 
)
Here is the caller graph for this function:

◆ task_set_data()

void task_set_data ( retro_task_t task,
void data 
)
Here is the caller graph for this function:

◆ task_set_error()

void task_set_error ( retro_task_t task,
char *  error 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_set_finished()

void task_set_finished ( retro_task_t task,
bool  finished 
)
Here is the caller graph for this function:

◆ task_set_mute()

void task_set_mute ( retro_task_t task,
bool  mute 
)

◆ task_set_progress()

void task_set_progress ( retro_task_t task,
int8_t  progress 
)
Here is the caller graph for this function:

◆ task_set_title()

void task_set_title ( retro_task_t task,
char *  title 
)
Here is the caller graph for this function:

Variable Documentation

◆ impl_current

struct retro_task_impl* impl_current = NULL
static

◆ impl_regular

struct retro_task_impl impl_regular
static
Initial value:
= {
}
static void retro_task_regular_wait(retro_task_condition_fn_t cond, void *data)
Definition: task_queue.c:195
static void retro_task_regular_deinit(void)
Definition: task_queue.c:213
static void retro_task_regular_push_running(retro_task_t *task)
Definition: task_queue.c:156
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void retro_task_regular_reset(void)
Definition: task_queue.c:201
static void retro_task_regular_init(void)
Definition: task_queue.c:209
static bool retro_task_regular_find(retro_task_finder_t func, void *user_data)
Definition: task_queue.c:217
static void retro_task_regular_cancel(void *task)
Definition: task_queue.c:161
static void retro_task_regular_retrieve(task_retriever_data_t *data)
Definition: task_queue.c:230
static void retro_task_regular_gather(void)
Definition: task_queue.c:167

◆ msg_push_bak

retro_task_queue_msg_t msg_push_bak
static

◆ task_threaded_enable

bool task_threaded_enable = false
static

◆ tasks_finished

task_queue_t tasks_finished = {NULL, NULL}
static

◆ tasks_running

task_queue_t tasks_running = {NULL, NULL}
static