diff options
author | Andy McFadden <fadden@android.com> | 2010-08-05 14:34:26 -0700 |
---|---|---|
committer | Andy McFadden <fadden@android.com> | 2010-08-06 07:38:26 -0700 |
commit | fc3d31683a0120ba005f45f98dcbe1001064dafb (patch) | |
tree | 2c708452469c7c00431a3b1d6aa9be68fe76b0b7 /vm/jdwp | |
parent | 5c828312261834e42147f7cd7b30003165df85fb (diff) | |
download | android_dalvik-fc3d31683a0120ba005f45f98dcbe1001064dafb.tar.gz android_dalvik-fc3d31683a0120ba005f45f98dcbe1001064dafb.tar.bz2 android_dalvik-fc3d31683a0120ba005f45f98dcbe1001064dafb.zip |
More SMP fixes.
Convert some ANDROID_MEMBAR_FULL uses into equivalent atomic ops. A
couple of "bool" had to convert to "int" since we don't have atomic
ops for bools.
Replaced a local implementation of atomic inc with a call to the
atomic inc function.
Change-Id: I948b8080d743552bde014d3a6e716ed2c30ebef8
Diffstat (limited to 'vm/jdwp')
-rw-r--r-- | vm/jdwp/JdwpMain.c | 3 | ||||
-rw-r--r-- | vm/jdwp/JdwpPriv.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/vm/jdwp/JdwpMain.c b/vm/jdwp/JdwpMain.c index 1688e5e7b..24e5c6c3c 100644 --- a/vm/jdwp/JdwpMain.c +++ b/vm/jdwp/JdwpMain.c @@ -231,8 +231,7 @@ static void* jdwpThreadStart(void* arg) */ state->debugThreadHandle = dvmThreadSelf()->handle; state->run = true; - ANDROID_MEMBAR_FULL(); - state->debugThreadStarted = true; // touch this last + android_atomic_release_store(true, &state->debugThreadStarted); dvmDbgLockMutex(&state->threadStartLock); dvmDbgCondBroadcast(&state->threadStartCond); diff --git a/vm/jdwp/JdwpPriv.h b/vm/jdwp/JdwpPriv.h index 85f9ec235..bc249f10f 100644 --- a/vm/jdwp/JdwpPriv.h +++ b/vm/jdwp/JdwpPriv.h @@ -79,7 +79,7 @@ struct JdwpState { pthread_mutex_t threadStartLock; pthread_cond_t threadStartCond; - bool debugThreadStarted; + int debugThreadStarted; pthread_t debugThreadHandle; ObjectId debugThreadId; bool run; |