Chromium Code Reviews| Index: sandbox/linux/services/syscall_wrappers.h |
| diff --git a/sandbox/linux/services/syscall_wrappers.h b/sandbox/linux/services/syscall_wrappers.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..eb2bd78dfb00c863b3e5c16dedbd38db9834081e |
| --- /dev/null |
| +++ b/sandbox/linux/services/syscall_wrappers.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ |
| +#define SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ |
| + |
| +#include <sys/types.h> |
| + |
| +#include "sandbox/sandbox_export.h" |
| + |
| +namespace sandbox { |
| + |
| +// Provide direct system call wrappers for a few common system calls. |
| +// These are guaranteed to perform a system call and do not rely on things such |
| +// as caching the current pid (c.f. getpid()). |
| + |
| +SANDBOX_EXPORT pid_t sys_getpid(void); |
| + |
| +SANDBOX_EXPORT pid_t sys_gettid(void); |
| + |
| +struct pt_regs; |
| +SANDBOX_EXPORT long sys_clone(unsigned long flags, |
|
mdempsky
2014/11/20 00:31:43
Most of the calls seem to be for sys_clone(flags,
jln (very slow on Chromium)
2014/11/20 18:04:50
Yeah, you're right, this needs to be cleaned-up. I
|
| + void* child_stack, |
| + void* ptid, |
| + void* ctid, |
| + struct pt_regs* regs); |
| + |
| +SANDBOX_EXPORT void sys_exit_group(int status); |
| + |
| +} // namespace sandbox |
| + |
| +#endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ |