src/share/vm/utilities/workgroup.hpp

Print this page




  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 #ifndef SHARE_VM_UTILITIES_WORKGROUP_HPP
  26 #define SHARE_VM_UTILITIES_WORKGROUP_HPP
  27 
  28 #include "utilities/taskqueue.hpp"
  29 #ifdef TARGET_OS_FAMILY_linux
  30 # include "thread_linux.inline.hpp"
  31 #endif
  32 #ifdef TARGET_OS_FAMILY_solaris
  33 # include "thread_solaris.inline.hpp"
  34 #endif
  35 #ifdef TARGET_OS_FAMILY_windows
  36 # include "thread_windows.inline.hpp"
  37 #endif
  38 














  39 // Forward declarations of classes defined here
  40 
  41 class WorkGang;
  42 class GangWorker;
  43 class YieldingFlexibleGangWorker;
  44 class YieldingFlexibleGangTask;
  45 class WorkData;
  46 class AbstractWorkGang;
  47 
  48 // An abstract task to be worked on by a gang.
  49 // You subclass this to supply your own work() method
  50 class AbstractGangTask VALUE_OBJ_CLASS_SPEC {
  51 public:
  52   // The abstract work method.
  53   // The argument tells you which member of the gang you are.
  54   virtual void work(int i) = 0;
  55 
  56   // This method configures the task for proper termination.
  57   // Some tasks do not have any requirements on termination
  58   // and may inherit this method that does nothing.  Some




  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 #ifndef SHARE_VM_UTILITIES_WORKGROUP_HPP
  26 #define SHARE_VM_UTILITIES_WORKGROUP_HPP
  27 
  28 #include "utilities/taskqueue.hpp"
  29 #ifdef TARGET_OS_FAMILY_linux
  30 # include "thread_linux.inline.hpp"
  31 #endif
  32 #ifdef TARGET_OS_FAMILY_solaris
  33 # include "thread_solaris.inline.hpp"
  34 #endif
  35 #ifdef TARGET_OS_FAMILY_windows
  36 # include "thread_windows.inline.hpp"
  37 #endif
  38 
  39 // Task class hierarchy:
  40 //   AbstractGangTask
  41 //     AbstractGangTaskWOopQueues
  42 //
  43 // Gang/Group class hierarchy:
  44 //   AbstractWorkGang
  45 //     WorkGang
  46 //       FlexibleWorkGang
  47 //         YieldingFlexibleWorkGang (defined in another file)
  48 //
  49 // Worker class hierarchy:
  50 //   GangWorker (subclass of WorkerThread)
  51 //     YieldingFlexibleGangWorker   (defined in another file)
  52 
  53 // Forward declarations of classes defined here
  54 
  55 class WorkGang;
  56 class GangWorker;
  57 class YieldingFlexibleGangWorker;
  58 class YieldingFlexibleGangTask;
  59 class WorkData;
  60 class AbstractWorkGang;
  61 
  62 // An abstract task to be worked on by a gang.
  63 // You subclass this to supply your own work() method
  64 class AbstractGangTask VALUE_OBJ_CLASS_SPEC {
  65 public:
  66   // The abstract work method.
  67   // The argument tells you which member of the gang you are.
  68   virtual void work(int i) = 0;
  69 
  70   // This method configures the task for proper termination.
  71   // Some tasks do not have any requirements on termination
  72   // and may inherit this method that does nothing.  Some