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

Side by Side Diff: src/trusted/service_runtime/nacl_text.h

Issue 12600034: Provide metadata to validator to allow faster caching. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: First fixes Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_TEXT_H_ 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_TEXT_H_
8 #define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_TEXT_H_ 8 #define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_NACL_TEXT_H_
9 9
10 #include "native_client/src/include/portability.h" 10 #include "native_client/src/include/portability.h"
11 #include "native_client/src/include/nacl_compiler_annotations.h" 11 #include "native_client/src/include/nacl_compiler_annotations.h"
12 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" 12 #include "native_client/src/trusted/service_runtime/nacl_error_code.h"
13 13
14 EXTERN_C_BEGIN 14 EXTERN_C_BEGIN
15 15
16 struct NaClApp; 16 struct NaClApp;
17 struct NaClAppThread; 17 struct NaClAppThread;
18 18
19 struct NaClDynamicRegion { 19 struct NaClDynamicRegion {
20 uintptr_t start; 20 uintptr_t start;
21 size_t size; 21 size_t size;
22 int delete_generation; 22 int delete_generation;
23 }; 23 };
24 24
25 struct NaClValidationMetadata;
26
25 /* 27 /*
26 * Create a shared memory descriptor and map it into the text region 28 * Create a shared memory descriptor and map it into the text region
27 * of the address space. This implies that the text size must be a 29 * of the address space. This implies that the text size must be a
28 * multiple of NACL_MAP_PAGESIZE. 30 * multiple of NACL_MAP_PAGESIZE.
29 */ 31 */
30 NaClErrorCode NaClMakeDynamicTextShared(struct NaClApp *nap) NACL_WUR; 32 NaClErrorCode NaClMakeDynamicTextShared(struct NaClApp *nap) NACL_WUR;
31 33
32 struct NaClDescEffectorShm; 34 struct NaClDescEffectorShm;
33 int NaClDescEffectorShmCtor(struct NaClDescEffectorShm *self) NACL_WUR; 35 int NaClDescEffectorShmCtor(struct NaClDescEffectorShm *self) NACL_WUR;
34 36
35 int NaClMinimumThreadGeneration(struct NaClApp *nap); 37 int NaClMinimumThreadGeneration(struct NaClApp *nap);
36 38
37 int32_t NaClTextDyncodeCreate(struct NaClApp *nap, 39 int32_t NaClTextDyncodeCreate(
38 uint32_t dest, 40 struct NaClApp *nap,
39 void *code_copy, 41 uint32_t dest,
40 uint32_t size) NACL_WUR; 42 void *code_copy,
43 uint32_t size,
44 const struct NaClValidationMetadata *metadata) NACL_WUR;
41 45
42 int32_t NaClSysDyncodeCreate(struct NaClAppThread *natp, 46 int32_t NaClSysDyncodeCreate(struct NaClAppThread *natp,
43 uint32_t dest, 47 uint32_t dest,
44 uint32_t src, 48 uint32_t src,
45 uint32_t size) NACL_WUR; 49 uint32_t size) NACL_WUR;
46 50
47 int32_t NaClSysDyncodeModify(struct NaClAppThread *natp, 51 int32_t NaClSysDyncodeModify(struct NaClAppThread *natp,
48 uint32_t dest, 52 uint32_t dest,
49 uint32_t src, 53 uint32_t src,
50 uint32_t size) NACL_WUR; 54 uint32_t size) NACL_WUR;
51 55
52 int32_t NaClSysDyncodeDelete(struct NaClAppThread *natp, 56 int32_t NaClSysDyncodeDelete(struct NaClAppThread *natp,
53 uint32_t dest, 57 uint32_t dest,
54 uint32_t size) NACL_WUR; 58 uint32_t size) NACL_WUR;
55 59
56 EXTERN_C_END 60 EXTERN_C_END
57 61
58 #endif 62 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698