diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/box64context.h | 1 | ||||
| -rw-r--r-- | src/include/os.h | 6 | ||||
| -rw-r--r-- | src/include/x64run.h | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/include/box64context.h b/src/include/box64context.h index d2c1d23a..2d554703 100644 --- a/src/include/box64context.h +++ b/src/include/box64context.h @@ -245,7 +245,6 @@ typedef struct box64context_s { #define mutex_trylock(A) pthread_mutex_trylock(A) #define mutex_unlock(A) pthread_mutex_unlock(A) #else -int GetTID(void); #define mutex_lock(A) {uint32_t tid = (uint32_t)GetTID(); while(native_lock_storeifnull_d(A, tid)) sched_yield();} #define mutex_trylock(A) native_lock_storeifnull_d(A, (uint32_t)GetTID()) #define mutex_unlock(A) native_lock_storeifref_d(A, 0, (uint32_t)GetTID()) diff --git a/src/include/os.h b/src/include/os.h new file mode 100644 index 00000000..1387255b --- /dev/null +++ b/src/include/os.h @@ -0,0 +1,6 @@ +#ifndef __OS_H_ +#define __OS_H_ + +int GetTID(void); + +#endif //__OS_H_ diff --git a/src/include/x64run.h b/src/include/x64run.h index 823a990c..c89e0786 100644 --- a/src/include/x64run.h +++ b/src/include/x64run.h @@ -8,6 +8,4 @@ int Run(x64emu_t *emu, int step); // 0 if run was successfull, 1 if error in x86 int RunTest(x64test_t *test); void DynaRun(x64emu_t *emu); -int GetTID(void); - #endif //__X64RUN_H_ |