OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SYSCALL_TABLE_H__ | |
6 #define SYSCALL_TABLE_H__ | |
7 | |
8 #include <sys/types.h> | |
9 | |
10 #ifdef __cplusplus | |
11 #include "securemem.h" | |
12 extern "C" { | |
13 namespace playground { | |
14 #define SecureMemArgs SecureMem::Args | |
15 #else | |
16 #define SecureMemArgs void | |
17 #define bool int | |
18 #endif | |
19 #define UNRESTRICTED_SYSCALL ((void *)1) | |
20 | |
21 struct SyscallTable { | |
22 void *handler; | |
23 bool (*trustedProcess)(int parentMapsFd, int sandboxFd, int threadFdPub, | |
24 int threadFd, SecureMemArgs* mem); | |
25 }; | |
26 extern const struct SyscallTable syscallTable[] | |
27 asm("playground$syscallTable") | |
28 #if defined(__x86_64__) | |
29 __attribute__((visibility("internal"))) | |
30 #endif | |
31 ; | |
32 extern const unsigned maxSyscall | |
33 asm("playground$maxSyscall") | |
34 #if defined(__x86_64__) | |
35 __attribute__((visibility("internal"))) | |
36 #endif | |
37 ; | |
38 #ifdef __cplusplus | |
39 } // namespace | |
40 } | |
41 #endif | |
42 | |
43 #endif // SYSCALL_TABLE_H__ | |
OLD | NEW |