< prev index next >

src/share/vm/gc/cms/yieldingWorkgroup.cpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"

  26 #include "utilities/macros.hpp"
  27 #include "utilities/yieldingWorkgroup.hpp"
  28 
  29 // Forward declaration of classes declared here.
  30 
  31 class GangWorker;
  32 class WorkData;
  33 
  34 YieldingFlexibleWorkGang::YieldingFlexibleWorkGang(
  35   const char* name, uint workers, bool are_GC_task_threads) :
  36   FlexibleWorkGang(name, workers, are_GC_task_threads, false),
  37     _yielded_workers(0) {}
  38 
  39 GangWorker* YieldingFlexibleWorkGang::allocate_worker(uint which) {
  40   YieldingFlexibleGangWorker* new_member =
  41       new YieldingFlexibleGangWorker(this, which);
  42   return (YieldingFlexibleGangWorker*) new_member;
  43 }
  44 
  45 // Run a task; returns when the task is done, or the workers yield,
  46 // or the task is aborted, or the work gang is terminated via stop().
  47 // A task that has been yielded can be continued via this interface




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/cms/yieldingWorkgroup.hpp"
  27 #include "utilities/macros.hpp"

  28 
  29 // Forward declaration of classes declared here.
  30 
  31 class GangWorker;
  32 class WorkData;
  33 
  34 YieldingFlexibleWorkGang::YieldingFlexibleWorkGang(
  35   const char* name, uint workers, bool are_GC_task_threads) :
  36   FlexibleWorkGang(name, workers, are_GC_task_threads, false),
  37     _yielded_workers(0) {}
  38 
  39 GangWorker* YieldingFlexibleWorkGang::allocate_worker(uint which) {
  40   YieldingFlexibleGangWorker* new_member =
  41       new YieldingFlexibleGangWorker(this, which);
  42   return (YieldingFlexibleGangWorker*) new_member;
  43 }
  44 
  45 // Run a task; returns when the task is done, or the workers yield,
  46 // or the task is aborted, or the work gang is terminated via stop().
  47 // A task that has been yielded can be continued via this interface


< prev index next >