Merge pull request #434 from joshuawarner32/master

fix concurrency bugs on ios+arm64 in `enter`
This commit is contained in:
Joel Dice 2015-05-08 15:48:39 -06:00
commit d42a354f7d

View File

@ -4040,6 +4040,8 @@ void enter(Thread* t, Thread::State s)
t->state = s; t->state = s;
STORE_LOAD_MEMORY_BARRIER;
if (t->m->exclusive) { if (t->m->exclusive) {
ACQUIRE_LOCK; ACQUIRE_LOCK;
@ -4091,6 +4093,8 @@ void enter(Thread* t, Thread::State s)
t->state = s; t->state = s;
STORE_LOAD_MEMORY_BARRIER;
if (t->m->exclusive) { if (t->m->exclusive) {
// another thread has entered the exclusive state, so we // another thread has entered the exclusive state, so we
// return to idle and use the slow path to become active // return to idle and use the slow path to become active