Mercurial > hg > truffle
comparison src/share/vm/utilities/taskqueue.cpp @ 1330:4a9cc99938e3
Merge
author | acorn |
---|---|
date | Fri, 26 Mar 2010 11:10:26 -0400 |
parents | 2a1472c30599 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1329:84043c7507b9 | 1330:4a9cc99938e3 |
---|---|
28 #ifdef TRACESPINNING | 28 #ifdef TRACESPINNING |
29 uint ParallelTaskTerminator::_total_yields = 0; | 29 uint ParallelTaskTerminator::_total_yields = 0; |
30 uint ParallelTaskTerminator::_total_spins = 0; | 30 uint ParallelTaskTerminator::_total_spins = 0; |
31 uint ParallelTaskTerminator::_total_peeks = 0; | 31 uint ParallelTaskTerminator::_total_peeks = 0; |
32 #endif | 32 #endif |
33 | |
34 bool TaskQueueSuper::peek() { | |
35 return _bottom != _age.top(); | |
36 } | |
37 | 33 |
38 int TaskQueueSetSuper::randomParkAndMiller(int *seed0) { | 34 int TaskQueueSetSuper::randomParkAndMiller(int *seed0) { |
39 const int a = 16807; | 35 const int a = 16807; |
40 const int m = 2147483647; | 36 const int m = 2147483647; |
41 const int q = 127773; /* m div a */ | 37 const int q = 127773; /* m div a */ |
178 "Terminator may still be in use"); | 174 "Terminator may still be in use"); |
179 _offered_termination = 0; | 175 _offered_termination = 0; |
180 } | 176 } |
181 } | 177 } |
182 | 178 |
179 #ifdef ASSERT | |
180 bool ObjArrayTask::is_valid() const { | |
181 return _obj != NULL && _obj->is_objArray() && _index > 0 && | |
182 _index < objArrayOop(_obj)->length(); | |
183 } | |
184 #endif // ASSERT | |
185 | |
183 bool RegionTaskQueueWithOverflow::is_empty() { | 186 bool RegionTaskQueueWithOverflow::is_empty() { |
184 return (_region_queue.size() == 0) && | 187 return (_region_queue.size() == 0) && |
185 (_overflow_stack->length() == 0); | 188 (_overflow_stack->length() == 0); |
186 } | 189 } |
187 | 190 |