diff options
| author | Andy McFadden <fadden@android.com> | 2010-08-23 16:45:24 -0700 |
|---|---|---|
| committer | Andy McFadden <fadden@android.com> | 2010-08-24 15:36:54 -0700 |
| commit | 6dce996e16e8a7f8d538910221aa29df43eed9ed (patch) | |
| tree | 9a3c2d6ef0d892f4171a53591398e9068ce1e4c8 /vm/compiler/codegen/arm/CodegenDriver.c | |
| parent | b023a2fc4d85fb0e8debe8ec5721dc7a3366347e (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.
Change-Id: I05c22ac5307fa3056fab854dfeed7aa1d76542f4
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenDriver.c')
0 files changed, 0 insertions, 0 deletions
