2013-04-20 22:54:09 +00:00
|
|
|
#ifndef GBA_THREAD_H
|
|
|
|
#define GBA_THREAD_H
|
|
|
|
|
|
|
|
#include <pthread.h>
|
|
|
|
|
|
|
|
struct GBAThread {
|
2013-04-20 23:16:37 +00:00
|
|
|
// Output
|
2013-04-20 23:40:08 +00:00
|
|
|
int started;
|
2013-04-20 22:54:09 +00:00
|
|
|
struct GBA* gba;
|
|
|
|
struct ARMDebugger* debugger;
|
2013-04-20 23:16:37 +00:00
|
|
|
|
|
|
|
// Input
|
|
|
|
struct GBAVideoRenderer* renderer;
|
2013-04-20 22:54:09 +00:00
|
|
|
int fd;
|
2013-04-20 23:40:08 +00:00
|
|
|
|
|
|
|
// Threading state
|
|
|
|
pthread_mutex_t mutex;
|
|
|
|
pthread_cond_t cond;
|
2013-04-20 22:54:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int GBAThreadStart(struct GBAThread* threadContext, pthread_t* thread);
|
|
|
|
|
|
|
|
#endif
|