Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: sandbox/linux/seccomp-bpf/kernel_return_value_helpers.h

Issue 260793003: [MIPS] Add seccomp bpf support (Closed) Base URL: https://git.chromium.org/git/chromium/src.git@master
Patch Set: Update per code review Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 #ifndef SANDBOX_LINUX_SERVICES_KERNEL_RETURN_VALUE_HELPERS_H__
jln (very slow on Chromium) 2014/06/03 01:00:33 Only one trailing "_".
nedeljko 2014/06/03 15:32:18 I looked in most of the *.h files in seccomp-bpf f
6 #define SANDBOX_LINUX_SERVICES_KERNEL_RETURN_VALUE_HELPERS_H__
7
8 #include <signal.h>
9
10 namespace sandbox {
11
12 // In order for errno to be converted to the value that kernel returns to
13 // indicate an error in syscall, errno needs to be negated on Intel/Arm. On
14 // Mips this is not the case since Mips has different mechanism for indicating
15 // error.
16 int ErrnoToKernelRet(int kernel_ret);
jln (very slow on Chromium) 2014/06/03 01:00:33 The argument is an errno, not |kernel_ret| The do
nedeljko 2014/06/03 15:32:18 Done.
17
18 // The return value from the syscall is written to appropriate register.
jln (very slow on Chromium) 2014/06/03 01:00:33 // Set the registers in |ctx| to match what they w
nedeljko 2014/06/03 15:32:18 Done.
19 void PutValueInUcontext(int ret_val, ucontext_t* ctx);
20
21 } // namespace sandbox
22
23 #endif // SANDBOX_LINUX_SERVICES_KERNEL_RETURN_VALUE_HELPERS_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698