src/gba/gba-thread.h (view raw)
1#ifndef GBA_THREAD_H
2#define GBA_THREAD_H
3
4#include <pthread.h>
5
6struct GBAThread {
7 // Output
8 int started;
9 struct GBA* gba;
10 struct ARMDebugger* debugger;
11
12 // Input
13 struct GBAVideoRenderer* renderer;
14 int fd;
15 int activeKeys;
16
17 // Threading state
18 pthread_mutex_t mutex;
19 pthread_cond_t cond;
20 pthread_t thread;
21};
22
23int GBAThreadStart(struct GBAThread* threadContext);
24void GBAThreadJoin(struct GBAThread* threadContext);
25
26#endif