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

Side by Side Diff: components/nacl/loader/nonsfi/irt_icache.cc

Issue 1409633002: Non-SFI mode: Remove old Non-SFI code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 #if defined(__arm__) // nacl_irt_icache is supported only on ARM.
6
7 #include <errno.h>
8 #include <sys/syscall.h>
9 #include <stddef.h>
10
11 #include "components/nacl/loader/nonsfi/irt_interfaces.h"
12
13 namespace nacl {
14 namespace nonsfi {
15
16 namespace {
17
18 // TODO(mazda): Revisit the implementation to consider inlining the syscall
19 // with assembly when Non-SFI mode's IRT implementations get moved to the
20 // NaCl repository.
21 int IrtClearCache(void* addr, size_t size) {
22 // The third argument of cacheflush is just ignored for now and should
23 // always be zero.
24 int result = syscall(__ARM_NR_cacheflush,
25 addr, reinterpret_cast<intptr_t>(addr) + size, 0);
26 if (result < 0)
27 return errno;
28 return 0;
29 }
30
31 } // namespace
32
33 const nacl_irt_icache kIrtIcache = {
34 IrtClearCache
35 };
36
37 } // namespace nonsfi
38 } // namespace nacl
39
40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698