| Index: runtime/vm/simulator_arm.h
|
| ===================================================================
|
| --- runtime/vm/simulator_arm.h (revision 44732)
|
| +++ runtime/vm/simulator_arm.h (working copy)
|
| @@ -24,6 +24,7 @@
|
| class Mutex;
|
| class RawObject;
|
| class SimulatorSetjmpBuffer;
|
| +class Thread;
|
|
|
| typedef struct {
|
| union {
|
| @@ -216,31 +217,30 @@
|
| intptr_t ReadExclusiveW(uword addr, Instr* instr);
|
| intptr_t WriteExclusiveW(uword addr, intptr_t value, Instr* instr);
|
|
|
| - // In Dart, there is at most one thread per isolate.
|
| - // We keep track of 16 exclusive access address tags across all isolates.
|
| + // We keep track of 16 exclusive access address tags across all threads.
|
| // Since we cannot simulate a native context switch, which clears
|
| // the exclusive access state of the local monitor (using the CLREX
|
| - // instruction), we associate the isolate requesting exclusive access to the
|
| - // address tag. Multiple isolates requesting exclusive access (using the LDREX
|
| + // instruction), we associate the thread requesting exclusive access to the
|
| + // address tag. Multiple threads requesting exclusive access (using the LDREX
|
| // instruction) to the same address will result in multiple address tags being
|
| - // created for the same address, one per isolate.
|
| - // At any given time, each isolate is associated to at most one address tag.
|
| + // created for the same address, one per thread.
|
| + // At any given time, each thread is associated to at most one address tag.
|
| static Mutex* exclusive_access_lock_;
|
| static const int kNumAddressTags = 16;
|
| static struct AddressTag {
|
| - Isolate* isolate;
|
| + Thread* thread;
|
| uword addr;
|
| } exclusive_access_state_[kNumAddressTags];
|
| static int next_address_tag_;
|
|
|
| - // Set access to given address to 'exclusive state' for current isolate.
|
| + // Set access to given address to 'exclusive state' for current thread.
|
| static void SetExclusiveAccess(uword addr);
|
|
|
| - // Returns true if the current isolate has exclusive access to given address,
|
| + // Returns true if the current thread has exclusive access to given address,
|
| // returns false otherwise. In either case, set access to given address to
|
| - // 'open state' for all isolates.
|
| + // 'open state' for all threads.
|
| // If given addr is NULL, set access to 'open state' for current
|
| - // isolate (CLREX).
|
| + // thread (CLREX).
|
| static bool HasExclusiveAccessAndOpen(uword addr);
|
|
|
| // Executing is handled based on the instruction type.
|
|
|