osThread_linux.cpp revision 3883:cd3d6a6b95d9
1111888Sjlemon/* 2193219Srwatson * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 3222249Srwatson * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4103781Sjake * 5103781Sjake * This code is free software; you can redistribute it and/or modify it 6204199Srwatson * under the terms of the GNU General Public License version 2 only, as 7204199Srwatson * published by the Free Software Foundation. 8204199Srwatson * 9103781Sjake * This code is distributed in the hope that it will be useful, but WITHOUT 10103781Sjake * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11103781Sjake * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12103781Sjake * version 2 for more details (a copy is included in the LICENSE file that 13111888Sjlemon * accompanied this code). 14103781Sjake * 15103781Sjake * You should have received a copy of the GNU General Public License version 16103781Sjake * 2 along with this work; if not, write to the Free Software Foundation, 17103781Sjake * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18111888Sjlemon * 19111888Sjlemon * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20111888Sjlemon * or visit www.oracle.com if you need additional information or have any 21111888Sjlemon * questions. 22111888Sjlemon * 23111888Sjlemon */ 24111888Sjlemon 25111888Sjlemon// no precompiled headers 26111888Sjlemon#include "runtime/mutex.hpp" 27111888Sjlemon#include "runtime/osThread.hpp" 28111888Sjlemon 29193219Srwatson#include <signal.h> 30193219Srwatson 31193219Srwatsonvoid OSThread::pd_initialize() { 32193219Srwatson assert(this != NULL, "check"); 33193219Srwatson _thread_id = 0; 34193219Srwatson _pthread_id = 0; 35193219Srwatson _siginfo = NULL; 36193219Srwatson _ucontext = NULL; 37193219Srwatson _expanding_stack = 0; 38193219Srwatson _alt_sig_stack = NULL; 39200898Srwatson 40200898Srwatson sigemptyset(&_caller_sigmask); 41200898Srwatson 42103781Sjake _startThread_lock = new Monitor(Mutex::event, "startThread_lock", true); 43200898Srwatson assert(_startThread_lock !=NULL, "check"); 44193219Srwatson} 45200898Srwatson 46193219Srwatsonvoid OSThread::pd_destroy() { 47193219Srwatson delete _startThread_lock; 48193219Srwatson} 49193219Srwatson