2076N/A/*
2076N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2076N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2076N/A *
2076N/A * This code is free software; you can redistribute it and/or modify it
2076N/A * under the terms of the GNU General Public License version 2 only, as
2076N/A * published by the Free Software Foundation.
2076N/A *
2076N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2076N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2076N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2076N/A * version 2 for more details (a copy is included in the LICENSE file that
2076N/A * accompanied this code).
2076N/A *
2076N/A * You should have received a copy of the GNU General Public License version
2076N/A * 2 along with this work; if not, write to the Free Software Foundation,
2076N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2076N/A *
2076N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2076N/A * or visit www.oracle.com if you need additional information or have any
2076N/A * questions.
2076N/A *
2076N/A */
2076N/A
2076N/A#ifndef SHARE_VM_RUNTIME_SERVICETHREAD_HPP
2076N/A#define SHARE_VM_RUNTIME_SERVICETHREAD_HPP
2076N/A
2076N/A#include "runtime/thread.hpp"
2076N/A
2076N/A// A JavaThread for low memory detection support and JVMTI
2076N/A// compiled-method-load events.
2076N/Aclass ServiceThread : public JavaThread {
2076N/A friend class VMStructs;
2076N/A private:
2076N/A
2076N/A static ServiceThread* _instance;
2076N/A
2076N/A static void service_thread_entry(JavaThread* thread, TRAPS);
2076N/A ServiceThread(ThreadFunction entry_point) : JavaThread(entry_point) {};
2076N/A
2076N/A public:
2076N/A static void initialize();
2076N/A
2076N/A // Hide this thread from external view.
2076N/A bool is_hidden_from_external_view() const { return true; }
2076N/A
2076N/A // Returns true if the passed thread is the service thread.
2076N/A static bool is_service_thread(Thread* thread);
2076N/A};
2076N/A
2076N/A#endif // SHARE_VM_RUNTIME_SERVICETHREAD_HPP