| OLD | NEW |
| 1 #ifndef SYSCALL_TABLE_H__ | 1 #ifndef SYSCALL_TABLE_H__ |
| 2 #define SYSCALL_TABLE_H__ | 2 #define SYSCALL_TABLE_H__ |
| 3 | 3 |
| 4 #include <sys/types.h> | 4 #include <sys/types.h> |
| 5 | 5 |
| 6 #ifdef __cplusplus | 6 #ifdef __cplusplus |
| 7 #include "securemem.h" | 7 #include "securemem.h" |
| 8 extern "C" { | 8 extern "C" { |
| 9 namespace playground { | 9 namespace playground { |
| 10 #define SecureMemArgs SecureMem::Args | 10 #define SecureMemArgs SecureMem::Args |
| 11 #else | 11 #else |
| 12 #define SecureMemArgs void | 12 #define SecureMemArgs void |
| 13 #define bool int | 13 #define bool int |
| 14 #endif | 14 #endif |
| 15 #define UNRESTRICTED_SYSCALL ((void *)1) | 15 #define UNRESTRICTED_SYSCALL ((void *)1) |
| 16 | 16 |
| 17 struct SyscallTable { | 17 struct SyscallTable { |
| 18 void *handler; | 18 void *handler; |
| 19 bool (*trustedProcess)(int parentProc, int sandboxFd, int threadFdPub, | 19 bool (*trustedProcess)(int parentMapsFd, int sandboxFd, int threadFdPub, |
| 20 int threadFd, SecureMemArgs* mem); | 20 int threadFd, SecureMemArgs* mem); |
| 21 }; | 21 }; |
| 22 extern const struct SyscallTable syscallTable[] | 22 extern const struct SyscallTable syscallTable[] |
| 23 asm("playground$syscallTable") | 23 asm("playground$syscallTable") |
| 24 #if defined(__x86_64__) | 24 #if defined(__x86_64__) |
| 25 __attribute__((visibility("internal"))) | 25 __attribute__((visibility("internal"))) |
| 26 #endif | 26 #endif |
| 27 ; | 27 ; |
| 28 extern const unsigned maxSyscall | 28 extern const unsigned maxSyscall |
| 29 asm("playground$maxSyscall") | 29 asm("playground$maxSyscall") |
| 30 #if defined(__x86_64__) | 30 #if defined(__x86_64__) |
| 31 __attribute__((visibility("internal"))) | 31 __attribute__((visibility("internal"))) |
| 32 #endif | 32 #endif |
| 33 ; | 33 ; |
| 34 #ifdef __cplusplus | 34 #ifdef __cplusplus |
| 35 } // namespace | 35 } // namespace |
| 36 } | 36 } |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 #endif // SYSCALL_TABLE_H__ | 39 #endif // SYSCALL_TABLE_H__ |
| OLD | NEW |