RetroArch
taskqueue.h
Go to the documentation of this file.
1 #pragma once
2 #include <wiiu/types.h>
3 #include <wiiu/os/time.h>
4 #include <wiiu/os/spinlock.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 typedef enum
11 {
16 } MPTaskState;
17 
18 typedef enum
19 {
26 
27 
29 
30 #pragma pack(push, 1)
31 typedef struct
32 {
37 } MPTaskInfo;
38 #pragma pack(pop)
39 
40 typedef struct MPTask MPTask;
41 typedef struct MPTaskQueue MPTaskQueue;
42 
43 #pragma pack(push, 1)
44 typedef struct MPTask
45 {
46  MPTask *self;
55  void *userData;
56 }MPTask;
57 #pragma pack(pop)
58 
59 typedef struct
60 {
67 
68 typedef struct MPTaskQueue
69 {
70  MPTaskQueue *self;
88 
89 void MPInitTaskQ(MPTaskQueue *queue, MPTask **queueBuffer, uint32_t queueBufferLen);
95 BOOL MPEnqueTask(MPTaskQueue *queue, MPTask *task);
97 uint32_t MPDequeTasks(MPTaskQueue *queue, MPTask **queueBuffer, uint32_t queueBufferLen);
101 void MPInitTask(MPTask *task, MPTaskFunc func, uint32_t userArg1, uint32_t userArg2);
102 BOOL MPTermTask(MPTask *task);
104 void *MPGetTaskUserData(MPTask *task);
105 void MPSetTaskUserData(MPTask *task, void *userData);
107 BOOL MPRunTask(MPTask *task);
108 
109 #ifdef __cplusplus
110 }
111 #endif
struct MPTask MPTask
Definition: taskqueue.h:40
MPTaskQueueState
Definition: taskqueue.h:18
Definition: taskqueue.h:59
OSTime duration
Definition: taskqueue.h:36
uint32_t tasksReady
Definition: taskqueue.h:73
Definition: taskqueue.h:23
uint32_t coreID
Definition: taskqueue.h:35
GLbitfield GLuint64 timeout
Definition: glext.h:7831
BOOL MPWaitTaskQWithTimeout(MPTaskQueue *queue, MPTaskQueueState wmask, OSTime timeout)
uint32_t __unknown5
Definition: taskqueue.h:83
Definition: taskqueue.h:22
OSSpinLock lock
Definition: taskqueue.h:86
uint32_t tasksReady
Definition: taskqueue.h:63
OSTime duration
Definition: taskqueue.h:54
BOOL MPRunTasksFromTaskQ(MPTaskQueue *queue, uint32_t count)
Definition: libretro.h:2275
Definition: taskqueue.h:14
MPTask * MPDequeTask(MPTaskQueue *queue)
Definition: taskqueue.h:12
uint32_t coreID
Definition: taskqueue.h:53
BOOL MPGetTaskQInfo(MPTaskQueue *queue, MPTaskQueueInfo *info)
struct MPTaskQueue MPTaskQueue
Definition: taskqueue.h:41
uint32_t tasksFinished
Definition: taskqueue.h:76
uint32_t __unknown0
Definition: taskqueue.h:75
uint32_t userArg1
Definition: taskqueue.h:50
uint32_t userArg2
Definition: taskqueue.h:51
Definition: taskqueue.h:44
GLuint GLuint GLsizei count
Definition: glext.h:6292
uint32_t __unknown2
Definition: taskqueue.h:78
MPTaskFunc func
Definition: taskqueue.h:49
void * MPGetTaskUserData(MPTask *task)
Definition: spinlock.h:9
uint32_t tasksFinished
Definition: taskqueue.h:65
uint32_t tasks
Definition: taskqueue.h:72
MPTaskState
Definition: taskqueue.h:10
BOOL MPResetTaskQ(MPTaskQueue *queue)
Definition: taskqueue.h:20
uint32_t result
Definition: taskqueue.h:52
Definition: taskqueue.h:68
void MPInitTaskQ(MPTaskQueue *queue, MPTask **queueBuffer, uint32_t queueBufferLen)
Definition: taskqueue.h:31
uint32_t __unknown1
Definition: taskqueue.h:77
GLenum func
Definition: glext.h:6668
Definition: taskqueue.h:13
uint32_t result
Definition: taskqueue.h:34
void MPSetTaskUserData(MPTask *task, void *userData)
void MPInitTask(MPTask *task, MPTaskFunc func, uint32_t userArg1, uint32_t userArg2)
GLenum GLint GLuint mask
Definition: glext.h:6668
uint32_t queueIndex
Definition: taskqueue.h:79
MPTaskQueueState state
Definition: taskqueue.h:61
int64_t OSTime
Definition: time.h:28
BOOL MPTermTask(MPTask *task)
uint32_t tasksRunning
Definition: taskqueue.h:64
MPTask ** queue
Definition: taskqueue.h:84
BOOL MPTermTaskQ(MPTaskQueue *queue)
BOOL MPEnqueTask(MPTaskQueue *queue, MPTask *task)
uint32_t tasks
Definition: taskqueue.h:62
BOOL MPRunTask(MPTask *task)
unsigned int BOOL
Definition: gctypes.h:51
uint32_t MPDequeTasks(MPTaskQueue *queue, MPTask **queueBuffer, uint32_t queueBufferLen)
uint32_t queueMaxSize
Definition: taskqueue.h:85
uint32_t queueSize
Definition: taskqueue.h:82
MPTaskState state
Definition: taskqueue.h:48
BOOL MPStartTaskQ(MPTaskQueue *queue)
BOOL MPStopTaskQ(MPTaskQueue *queue)
MPTaskQueueState state
Definition: taskqueue.h:71
uint32_t __unknown4
Definition: taskqueue.h:81
BOOL MPGetTaskInfo(MPTask *task, MPTaskInfo *info)
MPTaskState state
Definition: taskqueue.h:33
uint32_t(* MPTaskFunc)(uint32_t, uint32_t)
Definition: taskqueue.h:28
void * userData
Definition: jsonsax_full.h:259
BOOL MPPrintTaskQStats(MPTaskQueue *queue, uint32_t unk)
Definition: taskqueue.h:15
Definition: taskqueue.h:21
Definition: taskqueue.h:24
MPTaskQueue * queue
Definition: taskqueue.h:47
uint32_t __unknown3
Definition: taskqueue.h:80
uint32_t tasksRunning
Definition: taskqueue.h:74
unsigned int uint32_t
Definition: stdint.h:126
void * userData
Definition: taskqueue.h:55
BOOL MPWaitTaskQ(MPTaskQueue *queue, MPTaskQueueState mask)