aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/arm/CodegenFactory.c
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2010-08-23 16:45:24 -0700
committerAndy McFadden <fadden@android.com>2010-08-25 12:17:18 -0700
commitb5f3c0b8222efea953adb94b97a2c70ba58e26e3 (patch)
tree7ebaf9129361153795ad29cc4238a64b1d94a7fe /vm/compiler/codegen/arm/CodegenFactory.c
parentf16cfefc199d1416c5f83446c1d299786accc737 (diff)
Change the way thread suspension works.
There are at least three ways to handle detection of thread suspension correctly: (1) hold a mutex, (2) pile all state into a single 32-bit location and use atomic ops, and (3) order the operations carefully. Of these, #3 has the least overhead on uniprocessors, so we're going with that. It does introduce one quirk, because we're now changing to "running" mode before checking to see if we're allowed to run. This creates a tiny window of opportunity for assertions and thread dumps to see what appears to be a thread that's running when it shouldn't be. This is correctable with additional work (e.g. transitioning through a pre-running state) but probably not worth worrying about. This eliminates the separate self->isSuspended flag in favor of the new THREAD_SUSPENDED thread state. Bug 2667016. (cherry-pick from dalvik-dev) Change-Id: Ibc77ebbb03a7993bc4057c1c375498172ca8ff1c
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenFactory.c')
0 files changed, 0 insertions, 0 deletions