< prev index next >
src/share/vm/utilities/taskqueue.hpp
Print this page
rev 8068 : 6407976: GC worker number should be unsigned
Reviewed-by: jwilhelm
*** 1,7 ****
/*
! * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 596,608 ****
#undef TRACESPINNING
class ParallelTaskTerminator: public StackObj {
private:
! int _n_threads;
TaskQueueSetSuper* _queue_set;
! int _offered_termination;
#ifdef TRACESPINNING
static uint _total_yields;
static uint _total_spins;
static uint _total_peeks;
--- 596,608 ----
#undef TRACESPINNING
class ParallelTaskTerminator: public StackObj {
private:
! uint _n_threads;
TaskQueueSetSuper* _queue_set;
! uint _offered_termination;
#ifdef TRACESPINNING
static uint _total_yields;
static uint _total_spins;
static uint _total_peeks;
*** 615,625 ****
public:
// "n_threads" is the number of threads to be terminated. "queue_set" is a
// queue sets of work queues of other threads.
! ParallelTaskTerminator(int n_threads, TaskQueueSetSuper* queue_set);
// The current thread has no work, and is ready to terminate if everyone
// else is. If returns "true", all threads are terminated. If returns
// "false", available work has been observed in one of the task queues,
// so the global task is not complete.
--- 615,625 ----
public:
// "n_threads" is the number of threads to be terminated. "queue_set" is a
// queue sets of work queues of other threads.
! ParallelTaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set);
// The current thread has no work, and is ready to terminate if everyone
// else is. If returns "true", all threads are terminated. If returns
// "false", available work has been observed in one of the task queues,
// so the global task is not complete.
*** 637,647 ****
// in an MT-safe manner, once the previous round of use of
// the terminator is finished.
void reset_for_reuse();
// Same as above but the number of parallel threads is set to the
// given number.
! void reset_for_reuse(int n_threads);
#ifdef TRACESPINNING
static uint total_yields() { return _total_yields; }
static uint total_spins() { return _total_spins; }
static uint total_peeks() { return _total_peeks; }
--- 637,647 ----
// in an MT-safe manner, once the previous round of use of
// the terminator is finished.
void reset_for_reuse();
// Same as above but the number of parallel threads is set to the
// given number.
! void reset_for_reuse(uint n_threads);
#ifdef TRACESPINNING
static uint total_yields() { return _total_yields; }
static uint total_spins() { return _total_spins; }
static uint total_peeks() { return _total_peeks; }
< prev index next >