equal
deleted
inserted
replaced
264 } |
264 } |
265 return false; |
265 return false; |
266 } |
266 } |
267 #endif // PRODUCT |
267 #endif // PRODUCT |
268 |
268 |
|
269 void ClassLoaderData::clear_claim(int claim) { |
|
270 for (;;) { |
|
271 int old_claim = Atomic::load(&_claim); |
|
272 if ((old_claim & claim) == 0) { |
|
273 return; |
|
274 } |
|
275 int new_claim = old_claim & ~claim; |
|
276 if (Atomic::cmpxchg(new_claim, &_claim, old_claim) == old_claim) { |
|
277 return; |
|
278 } |
|
279 } |
|
280 } |
|
281 |
269 bool ClassLoaderData::try_claim(int claim) { |
282 bool ClassLoaderData::try_claim(int claim) { |
270 for (;;) { |
283 for (;;) { |
271 int old_claim = Atomic::load(&_claim); |
284 int old_claim = Atomic::load(&_claim); |
272 if ((old_claim & claim) == claim) { |
285 if ((old_claim & claim) == claim) { |
273 return false; |
286 return false; |