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

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

Issue 10134056: Refactor the process of choosing validators. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: gyp, extern, formatting Created 8 years, 7 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
Index: src/trusted/validator_x86/nccopycode.h
diff --git a/src/trusted/validator_x86/nccopycode.h b/src/trusted/validator_x86/nccopycode.h
index f3a86ddc4768ba8921ff87004f70216e1055b7d3..207fee3614f2474029e7516a01b74d6e4937cd49 100644
--- a/src/trusted/validator_x86/nccopycode.h
+++ b/src/trusted/validator_x86/nccopycode.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 The Native Client Authors. All rights reserved.
+ * Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -7,25 +7,9 @@
#ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCCOPYCODE_H_
#define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCCOPYCODE_H_
-#include "native_client/src/trusted/validator/x86/types_memory_model.h"
-
-#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.
+/* Copies a single instruction, avoiding the possibility of other threads
+ * executing a partially changed instruction.
*/
-int NaClCopyCodeIter(uint8_t *dst, uint8_t *src,
- NaClPcAddress vbase, size_t size);
-#else
-#error "Unknown Platform"
-#endif
+int NaClCopyInstruction_x86(uint8_t *dst, uint8_t *src, uint8_t sz);
#endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_COPYCODE_H_ */

Powered by Google App Engine
This is Rietveld 408576698