This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/sysmodules/pm/source/task_runner.h

23 lines
531 B
C
Raw Normal View History

2019-03-29 00:32:45 +01:00
#pragma once
#include <3ds/types.h>
#include <3ds/synchronization.h>
typedef struct TaskRunner {
LightEvent readyEvent;
LightEvent parametersSetEvent;
void (*task)(void *argdata);
u8 argStorage[0x40];
bool shouldTerminate;
2019-03-29 00:32:45 +01:00
} TaskRunner;
extern TaskRunner g_taskRunner;
void TaskRunner_Init(void);
void TaskRunner_RunTask(void (*task)(void *argdata), void *argdata, size_t argsize);
void TaskRunner_Terminate(void);
2019-03-29 00:32:45 +01:00
/// Thread function
void TaskRunner_HandleTasks(void *p);
void TaskRunner_WaitReady(void);