OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 #include "sandbox/linux/services/syscall_wrappers.h" |
| 6 |
| 7 #include <sys/syscall.h> |
| 8 #include <sys/types.h> |
| 9 #include <unistd.h> |
| 10 |
| 11 #include "sandbox/linux/services/linux_syscalls.h" |
| 12 |
| 13 namespace sandbox { |
| 14 |
| 15 pid_t sys_getpid(void) { |
| 16 return syscall(__NR_getpid); |
| 17 } |
| 18 |
| 19 pid_t sys_gettid(void) { |
| 20 return syscall(__NR_gettid); |
| 21 } |
| 22 |
| 23 long sys_clone(unsigned long flags, |
| 24 void* child_stack, |
| 25 void* ptid, |
| 26 void* ctid, |
| 27 struct pt_regs* regs) { |
| 28 return syscall(__NR_clone, flags, child_stack, ptid, ctid, regs); |
| 29 } |
| 30 |
| 31 void sys_exit_group(int status) { |
| 32 syscall(__NR_exit_group, status); |
| 33 } |
| 34 |
| 35 } // namespace sandbox |
OLD | NEW |