src/share/vm/utilities/taskqueue.hpp

changeset 4235
3dfffc8b9722
parent 4153
b9a9ed0f8eeb
child 4901
83f27710f5f7
     1.1 --- a/src/share/vm/utilities/taskqueue.hpp	Tue Oct 30 10:23:55 2012 -0700
     1.2 +++ b/src/share/vm/utilities/taskqueue.hpp	Tue Oct 30 20:26:44 2012 +0100
     1.3 @@ -496,9 +496,7 @@
     1.4      }
     1.5    }
     1.6  
     1.7 -  bool steal_1_random(uint queue_num, int* seed, E& t);
     1.8    bool steal_best_of_2(uint queue_num, int* seed, E& t);
     1.9 -  bool steal_best_of_all(uint queue_num, int* seed, E& t);
    1.10  
    1.11    void register_queue(uint i, T* q);
    1.12  
    1.13 @@ -538,46 +536,6 @@
    1.14  }
    1.15  
    1.16  template<class T, MEMFLAGS F> bool
    1.17 -GenericTaskQueueSet<T, F>::steal_best_of_all(uint queue_num, int* seed, E& t) {
    1.18 -  if (_n > 2) {
    1.19 -    int best_k;
    1.20 -    uint best_sz = 0;
    1.21 -    for (uint k = 0; k < _n; k++) {
    1.22 -      if (k == queue_num) continue;
    1.23 -      uint sz = _queues[k]->size();
    1.24 -      if (sz > best_sz) {
    1.25 -        best_sz = sz;
    1.26 -        best_k = k;
    1.27 -      }
    1.28 -    }
    1.29 -    return best_sz > 0 && _queues[best_k]->pop_global(t);
    1.30 -  } else if (_n == 2) {
    1.31 -    // Just try the other one.
    1.32 -    int k = (queue_num + 1) % 2;
    1.33 -    return _queues[k]->pop_global(t);
    1.34 -  } else {
    1.35 -    assert(_n == 1, "can't be zero.");
    1.36 -    return false;
    1.37 -  }
    1.38 -}
    1.39 -
    1.40 -template<class T, MEMFLAGS F> bool
    1.41 -GenericTaskQueueSet<T, F>::steal_1_random(uint queue_num, int* seed, E& t) {
    1.42 -  if (_n > 2) {
    1.43 -    uint k = queue_num;
    1.44 -    while (k == queue_num) k = TaskQueueSetSuper::randomParkAndMiller(seed) % _n;
    1.45 -    return _queues[2]->pop_global(t);
    1.46 -  } else if (_n == 2) {
    1.47 -    // Just try the other one.
    1.48 -    int k = (queue_num + 1) % 2;
    1.49 -    return _queues[k]->pop_global(t);
    1.50 -  } else {
    1.51 -    assert(_n == 1, "can't be zero.");
    1.52 -    return false;
    1.53 -  }
    1.54 -}
    1.55 -
    1.56 -template<class T, MEMFLAGS F> bool
    1.57  GenericTaskQueueSet<T, F>::steal_best_of_2(uint queue_num, int* seed, E& t) {
    1.58    if (_n > 2) {
    1.59      uint k1 = queue_num;

mercurial