equal
deleted
inserted
replaced
242 if (current_offered == _n_threads) { |
242 if (current_offered == _n_threads) { |
243 assert(!peek_in_queue_set(), "Precondition"); |
243 assert(!peek_in_queue_set(), "Precondition"); |
244 return true; |
244 return true; |
245 } |
245 } |
246 expected_value = current_offered; |
246 expected_value = current_offered; |
247 } while ((current_offered = Atomic::cmpxchg(current_offered - 1, &_offered_termination, current_offered)) != expected_value); |
247 } while ((current_offered = Atomic::cmpxchg(&_offered_termination, current_offered, current_offered - 1)) != expected_value); |
248 |
248 |
249 assert(_offered_termination < _n_threads, "Invariant"); |
249 assert(_offered_termination < _n_threads, "Invariant"); |
250 return false; |
250 return false; |
251 } |
251 } |
252 |
252 |