OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sandbox/linux/services/syscall_wrappers.h" | 5 #include "sandbox/linux/services/syscall_wrappers.h" |
6 | 6 |
| 7 #include <sys/resource.h> |
7 #include <sys/syscall.h> | 8 #include <sys/syscall.h> |
| 9 #include <sys/time.h> |
8 #include <sys/types.h> | 10 #include <sys/types.h> |
9 #include <unistd.h> | 11 #include <unistd.h> |
10 | 12 |
11 #include "base/logging.h" | 13 #include "base/logging.h" |
12 #include "build/build_config.h" | 14 #include "build/build_config.h" |
13 #include "sandbox/linux/services/linux_syscalls.h" | 15 #include "sandbox/linux/services/linux_syscalls.h" |
14 | 16 |
15 namespace sandbox { | 17 namespace sandbox { |
16 | 18 |
17 pid_t sys_getpid(void) { | 19 pid_t sys_getpid(void) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void sys_exit_group(int status) { | 57 void sys_exit_group(int status) { |
56 syscall(__NR_exit_group, status); | 58 syscall(__NR_exit_group, status); |
57 } | 59 } |
58 | 60 |
59 int sys_seccomp(unsigned int operation, | 61 int sys_seccomp(unsigned int operation, |
60 unsigned int flags, | 62 unsigned int flags, |
61 const struct sock_fprog* args) { | 63 const struct sock_fprog* args) { |
62 return syscall(__NR_seccomp, operation, flags, args); | 64 return syscall(__NR_seccomp, operation, flags, args); |
63 } | 65 } |
64 | 66 |
| 67 int sys_prlimit64(pid_t pid, |
| 68 int resource, |
| 69 const struct rlimit64* new_limit, |
| 70 struct rlimit64* old_limit) { |
| 71 return syscall(__NR_prlimit64, pid, resource, new_limit, old_limit); |
| 72 } |
| 73 |
65 } // namespace sandbox | 74 } // namespace sandbox |
OLD | NEW |