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

Side by Side Diff: src/arm/simulator-arm.cc

Issue 2852983002: [simulator] Make reference redirection thread-safe. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « src/arm/simulator-arm.h ('k') | src/arm64/simulator-arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdarg.h> 5 #include <stdarg.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <cmath> 7 #include <cmath>
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 delete static_cast<CachePage*>(entry->value); 796 delete static_cast<CachePage*>(entry->value);
797 } 797 }
798 delete i_cache; 798 delete i_cache;
799 } 799 }
800 } 800 }
801 801
802 802
803 void* Simulator::RedirectExternalReference(Isolate* isolate, 803 void* Simulator::RedirectExternalReference(Isolate* isolate,
804 void* external_function, 804 void* external_function,
805 ExternalReference::Type type) { 805 ExternalReference::Type type) {
806 base::LockGuard<base::Mutex> lock_guard(
807 isolate->simulator_redirection_mutex());
806 Redirection* redirection = Redirection::Get(isolate, external_function, type); 808 Redirection* redirection = Redirection::Get(isolate, external_function, type);
807 return redirection->address_of_swi_instruction(); 809 return redirection->address_of_swi_instruction();
808 } 810 }
809 811
810 812
811 // Get the active Simulator for the current thread. 813 // Get the active Simulator for the current thread.
812 Simulator* Simulator::current(Isolate* isolate) { 814 Simulator* Simulator::current(Isolate* isolate) {
813 v8::internal::Isolate::PerIsolateThreadData* isolate_data = 815 v8::internal::Isolate::PerIsolateThreadData* isolate_data =
814 isolate->FindOrAllocatePerThreadDataForThisThread(); 816 isolate->FindOrAllocatePerThreadDataForThisThread();
815 DCHECK(isolate_data != NULL); 817 DCHECK(isolate_data != NULL);
(...skipping 5271 matching lines...) Expand 10 before | Expand all | Expand 10 after
6087 processor->prev_ = nullptr; 6089 processor->prev_ = nullptr;
6088 processor->next_ = nullptr; 6090 processor->next_ = nullptr;
6089 } 6091 }
6090 6092
6091 } // namespace internal 6093 } // namespace internal
6092 } // namespace v8 6094 } // namespace v8
6093 6095
6094 #endif // USE_SIMULATOR 6096 #endif // USE_SIMULATOR
6095 6097
6096 #endif // V8_TARGET_ARCH_ARM 6098 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.h ('k') | src/arm64/simulator-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698