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

Unified Diff: src/trusted/validator_x86/nccopycode.h

Issue 5738003: Resurrect Petr's 64-bit dynamic code modification CL:... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/service_runtime/sel_validate_image.c ('k') | src/trusted/validator_x86/nccopycode.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator_x86/nccopycode.h
===================================================================
--- src/trusted/validator_x86/nccopycode.h (revision 4097)
+++ src/trusted/validator_x86/nccopycode.h (working copy)
@@ -9,9 +9,24 @@
#include "native_client/src/trusted/validator_x86/types_memory_model.h"
-/* copies code from src to dest in a thread safe way, returns 0 on success */
+#if NACL_TARGET_SUBARCH == 32
+/* Copies code from src to dest in a thread safe way, returns 1 on success,
+ * returns 0 on error. This will likely assert on error to avoid partially
+ * copied code or undefined state.
+ */
int NCCopyCode(uint8_t *dst, uint8_t *src, NaClPcAddress vbase,
size_t sz, int bundle_size);
+#elif NACL_TARGET_SUBARCH == 64
+/* Copies code from src to dest in a thread safe way, returns 1 on success,
+ * returns 0 on error. This will likely assert on error to avoid partially
+ * copied code or undefined state.
+ */
+int NaClCopyCodeIter(uint8_t *dst, uint8_t *src,
+ NaClPcAddress vbase, size_t size);
+#else
+#error "Unknown Platform"
+#endif
+
#endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_COPYCODE_H_ */
« no previous file with comments | « src/trusted/service_runtime/sel_validate_image.c ('k') | src/trusted/validator_x86/nccopycode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698