2137 |
|
rs = lockRunState(); |
2138 |
|
unlockRunState(rs, (rs & ~RSLOCK) | SHUTDOWN); |
2139 |
|
} |
2140 |
< |
if ((rs & STOP) == 0) { // enter STOP phase |
2140 |
> |
if ((rs & STOP) == 0) { |
2141 |
|
if (!now && (int)(ctl >> AC_SHIFT) + (config & SMASK) > 0) |
2142 |
|
return false; |
2143 |
< |
rs = lockRunState(); |
2143 |
> |
WorkQueue[] ws; WorkQueue w; // validate no submissions |
2144 |
> |
if ((ws = workQueues) != null) { |
2145 |
> |
for (int i = 0; i < ws.length; ++i) { |
2146 |
> |
if ((w = ws[i]) != null && |
2147 |
> |
(!w.isEmpty() || ((i & 1) != 0 && w.scanState >= 0))) { |
2148 |
> |
signalWork(ws, w); |
2149 |
> |
return false; |
2150 |
> |
} |
2151 |
> |
} |
2152 |
> |
} |
2153 |
> |
rs = lockRunState(); // enter STOP phase |
2154 |
|
unlockRunState(rs, (rs & ~RSLOCK) | STOP); |
2155 |
|
} |
2156 |
|
for (int pass = 0; pass < 3; ++pass) { // clobber other workers |