about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-04-01 19:50:49 +0800
committerGitHub <noreply@github.com>2025-04-01 13:50:49 +0200
commitc2a77fca277a96a49e45788601a4afc9570b1eb2 (patch)
tree7f2737d4882c03a401f86ba91a79e6b2633492dc /src/include
parent670876112e3ab4a36205223a6f0c4290a527c4a9 (diff)
downloadbox64-c2a77fca277a96a49e45788601a4afc9570b1eb2.tar.gz
box64-c2a77fca277a96a49e45788601a4afc9570b1eb2.zip
Added os.h for future usage (#2488)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/box64context.h1
-rw-r--r--src/include/os.h6
-rw-r--r--src/include/x64run.h2
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_