diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-04-03 21:48:04 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-03 15:48:04 +0200 |
| commit | 8cba915bca8d48a7ac4d9571004975320f71a7ff (patch) | |
| tree | 259c7742564658696da8f75f421e29c1ceb9bf7e /src/include | |
| parent | cd3163a78585c35d41a18f248cb9575c46ffab38 (diff) | |
| download | box64-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/include')
| -rw-r--r-- | src/include/bridge.h | 2 | ||||
| -rw-r--r-- | src/include/os.h | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/include/bridge.h b/src/include/bridge.h index e87e5d45..a4797bce 100644 --- a/src/include/bridge.h +++ b/src/include/bridge.h @@ -31,6 +31,6 @@ void init_bridge_helper(void); void fini_bridge_helper(void); // Is what pointed at addr a native call? And if yes, to what function? -int isNativeCall(uintptr_t addr, int is32bits, uintptr_t* calladdress, uint16_t* retn); +int isNativeCallInternal(uintptr_t addr, int is32bits, uintptr_t* calladdress, uint16_t* retn); #endif //__BRIDGE_H_ diff --git a/src/include/os.h b/src/include/os.h index 6646c49f..6968df19 100644 --- a/src/include/os.h +++ b/src/include/os.h @@ -1,12 +1,24 @@ #ifndef __OS_H_ #define __OS_H_ +#include <stdint.h> + int GetTID(void); int SchedYield(void); void EmitSignal(void* emu, int sig, void* addr, int code); void EmitDiv0(void* emu, void* addr, int code); void EmitInterruption(void* emu, int num, void* addr); +void EmuX64Syscall(void* emu); +void EmuX86Syscall(void* emu); + +// These functions only applies to Linux -------------------------- +int IsBridgeSignature(char s, char c); +int IsNativeCall(uintptr_t addr, int is32bits, uintptr_t* calladdress, uint16_t* retn); +void EmuInt3(void* emu, void* addr); +void* EmuFork(void* emu, int forktype); +// ---------------------------------------------------------------- + #ifndef _WIN32 #include <setjmp.h> #define LongJmp longjmp |