about summary refs log tree commit diff stats
path: root/src/os/os_linux.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2025-04-03 21:48:04 +0800
committerGitHub <noreply@github.com>2025-04-03 15:48:04 +0200
commit8cba915bca8d48a7ac4d9571004975320f71a7ff (patch)
tree259c7742564658696da8f75f421e29c1ceb9bf7e /src/os/os_linux.c
parentcd3163a78585c35d41a18f248cb9575c46ffab38 (diff)
downloadbox64-8cba915bca8d48a7ac4d9571004975320f71a7ff.tar.gz
box64-8cba915bca8d48a7ac4d9571004975320f71a7ff.zip
Moved more functions to os.h (#2497)
* Removed some unused function declarations

* Moved more functions to os.h

* review
Diffstat (limited to 'src/os/os_linux.c')
-rw-r--r--src/os/os_linux.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/os/os_linux.c b/src/os/os_linux.c
index b09bcc35..46a0434b 100644
--- a/src/os/os_linux.c
+++ b/src/os/os_linux.c
@@ -5,6 +5,8 @@
 
 #include "os.h"
 #include "signals.h"
+#include "emu/x64int_private.h"
+#include "bridge.h"
 
 int GetTID(void)
 {
@@ -30,3 +32,33 @@ void EmitInterruption(void* emu, int num, void* addr)
 {
     return emit_interruption((x64emu_t*)emu, num, addr);
 }
+
+int IsBridgeSignature(char s, char c)
+{
+    return s == 'S' && c == 'C';
+}
+
+void EmuInt3(void* emu, void* addr)
+{
+    return x64Int3((x64emu_t*)emu, (uintptr_t*)addr);
+}
+
+int IsNativeCall(uintptr_t addr, int is32bits, uintptr_t* calladdress, uint16_t* retn)
+{
+    return isNativeCallInternal(addr, is32bits, calladdress, retn);
+}
+
+void* EmuFork(void* emu, int forktype)
+{
+    return x64emu_fork((x64emu_t*)emu, forktype);
+}
+
+void EmuX64Syscall(void* emu)
+{
+    x64Syscall((x64emu_t*)emu);
+}
+
+void EmuX86Syscall(void* emu)
+{
+    x86Syscall((x64emu_t*)emu);
+}