src/os/bsd/vm/osThread_bsd.hpp

Print this page
rev 3111 : imported patch osx-threadid

*** 1,7 **** /* ! * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 38,50 **** } private: #ifdef _ALLBSD_SOURCE ! // _thread_id and _pthread_id are the same on BSD ! // keep both to minimize code divergence in os_bsd.cpp ! pthread_t _thread_id; pthread_t _pthread_id; #else // _thread_id is kernel thread id (similar to LWP id on Solaris). Each // thread has a unique thread_id (BsdThreads or NPTL). It can be used // to access /proc. --- 38,48 ---- } private: #ifdef _ALLBSD_SOURCE ! thread_t _thread_id; pthread_t _pthread_id; #else // _thread_id is kernel thread id (similar to LWP id on Solaris). Each // thread has a unique thread_id (BsdThreads or NPTL). It can be used // to access /proc.
*** 62,72 **** // Methods to save/restore caller's signal mask sigset_t caller_sigmask() const { return _caller_sigmask; } void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; } #ifdef _ALLBSD_SOURCE ! pthread_t thread_id() const { return _thread_id; } #else pid_t thread_id() const { return _thread_id; --- 60,70 ---- // Methods to save/restore caller's signal mask sigset_t caller_sigmask() const { return _caller_sigmask; } void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; } #ifdef _ALLBSD_SOURCE ! thread_t thread_id() const { return _thread_id; } #else pid_t thread_id() const { return _thread_id;
*** 82,92 **** bool valid_reposition_failure() { return false; } #endif // ASSERT #ifdef _ALLBSD_SOURCE ! void set_thread_id(pthread_t id) { _thread_id = id; } #else void set_thread_id(pid_t id) { _thread_id = id; --- 80,90 ---- bool valid_reposition_failure() { return false; } #endif // ASSERT #ifdef _ALLBSD_SOURCE ! void set_thread_id(thread_t id) { _thread_id = id; } #else void set_thread_id(pid_t id) { _thread_id = id;