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 #ifndef SHARE_VM_RUNTIME_VMTHREAD_HPP
26 #define SHARE_VM_RUNTIME_VMTHREAD_HPP
27
28 #include "runtime/perfData.hpp"
29 #include "runtime/vm_operations.hpp"
30 #ifdef TARGET_OS_FAMILY_linux
31 # include "thread_linux.inline.hpp"
32 #endif
33 #ifdef TARGET_OS_FAMILY_solaris
34 # include "thread_solaris.inline.hpp"
35 #endif
36 #ifdef TARGET_OS_FAMILY_windows
37 # include "thread_windows.inline.hpp"
38 #endif
39 #ifdef TARGET_OS_FAMILY_bsd
40 # include "thread_bsd.inline.hpp"
41 #endif
42
43 //
44 // Prioritized queue of VM operations.
45 //
46 // Encapsulates both queue management and
47 // and priority policy
48 //
49 class VMOperationQueue : public CHeapObj<mtInternal> {
50 private:
51 enum Priorities {
52 SafepointPriority, // Highest priority (operation executed at a safepoint)
53 MediumPriority, // Medium priority
54 nof_priorities
55 };
56
57 // We maintain a doubled linked list, with explicit count.
58 int _queue_length[nof_priorities];
59 int _queue_counter;
60 VM_Operation* _queue [nof_priorities];
61 // we also allow the vmThread to register the ops it has drained so we
|
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 #ifndef SHARE_VM_RUNTIME_VMTHREAD_HPP
26 #define SHARE_VM_RUNTIME_VMTHREAD_HPP
27
28 #include "runtime/perfData.hpp"
29 #include "runtime/thread.inline.hpp"
30 #include "runtime/vm_operations.hpp"
31
32 //
33 // Prioritized queue of VM operations.
34 //
35 // Encapsulates both queue management and
36 // and priority policy
37 //
38 class VMOperationQueue : public CHeapObj<mtInternal> {
39 private:
40 enum Priorities {
41 SafepointPriority, // Highest priority (operation executed at a safepoint)
42 MediumPriority, // Medium priority
43 nof_priorities
44 };
45
46 // We maintain a doubled linked list, with explicit count.
47 int _queue_length[nof_priorities];
48 int _queue_counter;
49 VM_Operation* _queue [nof_priorities];
50 // we also allow the vmThread to register the ops it has drained so we
|