diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-02 15:18:23 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-02 15:18:23 +0100 |
| commit | eb6c4594e1831daeddc469ed69c4dee917e627c1 (patch) | |
| tree | ff8e5ec2506fde9ff69ca0850e84667669c8f471 /src/include/threads.h | |
| parent | 1b9d1dc6093028ceb0f2eeeccf9cfbc5610fcf30 (diff) | |
| download | box64-eb6c4594e1831daeddc469ed69c4dee917e627c1.tar.gz box64-eb6c4594e1831daeddc469ed69c4dee917e627c1.zip | |
Added basic thread infrastructure
Diffstat (limited to 'src/include/threads.h')
| -rwxr-xr-x | src/include/threads.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/include/threads.h b/src/include/threads.h new file mode 100755 index 00000000..fa9d64ab --- /dev/null +++ b/src/include/threads.h @@ -0,0 +1,23 @@ +#ifndef _THREADS_H_ +#define _THREADS_H_ + +typedef struct box64context_s box64context_t; +typedef struct x64emu_s x64emu_t; + +typedef struct emu_jmpbuf_s { + x64emu_t* emu; + void* jmpbuf; + int jmpbuf_ok; +} emu_jmpbuf_t; + +void CleanStackSize(box64context_t* context); + +emu_jmpbuf_t* GetJmpBuf(); + +void init_pthread_helper(); +void fini_pthread_helper(box64context_t* context); + +// prepare an "emuthread structure" in pet and return address of function pointer for a "thread creation routine" +void* my_prepare_thread(x64emu_t *emu, void* f, void* arg, int ssize, void** pet); + +#endif //_THREADS_H_ \ No newline at end of file |