2796N/A/*
3362N/A * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
2796N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2796N/A *
2796N/A * This code is free software; you can redistribute it and/or modify it
2796N/A * under the terms of the GNU General Public License version 2 only, as
2796N/A * published by the Free Software Foundation.
2796N/A *
2796N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2796N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2796N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2796N/A * version 2 for more details (a copy is included in the LICENSE file that
2796N/A * accompanied this code).
2796N/A *
2796N/A * You should have received a copy of the GNU General Public License version
2796N/A * 2 along with this work; if not, write to the Free Software Foundation,
2796N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2796N/A *
2796N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2796N/A * or visit www.oracle.com if you need additional information or have any
2796N/A * questions.
2796N/A *
2796N/A */
2796N/A
2796N/A// no precompiled headers
2796N/A#include "runtime/atomic.hpp"
2796N/A#include "runtime/handles.inline.hpp"
2796N/A#include "runtime/mutexLocker.hpp"
2796N/A#include "runtime/os.hpp"
2796N/A#include "runtime/osThread.hpp"
2796N/A#include "runtime/safepoint.hpp"
2796N/A#include "runtime/vmThread.hpp"
2796N/A#ifdef TARGET_ARCH_x86
2796N/A# include "assembler_x86.inline.hpp"
2796N/A#endif
2796N/A#ifdef TARGET_ARCH_sparc
2796N/A# include "assembler_sparc.inline.hpp"
2796N/A#endif
2796N/A#ifdef TARGET_ARCH_zero
2796N/A# include "assembler_zero.inline.hpp"
2796N/A#endif
2796N/A#ifdef TARGET_ARCH_arm
2796N/A# include "assembler_arm.inline.hpp"
2796N/A#endif
2796N/A#ifdef TARGET_ARCH_ppc
2796N/A# include "assembler_ppc.inline.hpp"
2796N/A#endif
2796N/A
2796N/A
2796N/Avoid OSThread::pd_initialize() {
2796N/A assert(this != NULL, "check");
3362N/A#ifdef __APPLE__
3362N/A _thread_id = 0;
3362N/A#else
2796N/A _thread_id = NULL;
3362N/A#endif
2796N/A _pthread_id = NULL;
2796N/A _siginfo = NULL;
2796N/A _ucontext = NULL;
2796N/A _expanding_stack = 0;
2796N/A _alt_sig_stack = NULL;
2796N/A
2796N/A sigemptyset(&_caller_sigmask);
2796N/A
2796N/A _startThread_lock = new Monitor(Mutex::event, "startThread_lock", true);
2796N/A assert(_startThread_lock !=NULL, "check");
2796N/A}
2796N/A
2796N/Avoid OSThread::pd_destroy() {
2796N/A delete _startThread_lock;
2796N/A}