src/os/linux/vm/osThread_linux.hpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   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  private:
  26   int _thread_type;
  27 
  28  public:
  29 
  30   int thread_type() const {
  31     return _thread_type;
  32   }
  33   void set_thread_type(int type) {
  34     _thread_type = type;
  35   }
  36 
  37  private:
  38 
  39   // _thread_id is kernel thread id (similar to LWP id on Solaris). Each
  40   // thread has a unique thread_id (LinuxThreads or NPTL). It can be used
  41   // to access /proc.
  42   pid_t     _thread_id;
  43 
  44   // _pthread_id is the pthread id, which is used by library calls


 122   Monitor* _startThread_lock;     // sync parent and child in thread creation
 123 
 124 public:
 125 
 126   Monitor* startThread_lock() const {
 127     return _startThread_lock;
 128   }
 129 
 130   // ***************************************************************
 131   // Platform dependent initialization and cleanup
 132   // ***************************************************************
 133 
 134 private:
 135 
 136   void pd_initialize();
 137   void pd_destroy();
 138 
 139 // Reconciliation History
 140 // osThread_solaris.hpp 1.24 99/08/27 13:11:54
 141 // End


   1 /*
   2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   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 OS_LINUX_VM_OSTHREAD_LINUX_HPP
  26 #define OS_LINUX_VM_OSTHREAD_LINUX_HPP
  27 
  28  private:
  29   int _thread_type;
  30 
  31  public:
  32 
  33   int thread_type() const {
  34     return _thread_type;
  35   }
  36   void set_thread_type(int type) {
  37     _thread_type = type;
  38   }
  39 
  40  private:
  41 
  42   // _thread_id is kernel thread id (similar to LWP id on Solaris). Each
  43   // thread has a unique thread_id (LinuxThreads or NPTL). It can be used
  44   // to access /proc.
  45   pid_t     _thread_id;
  46 
  47   // _pthread_id is the pthread id, which is used by library calls


 125   Monitor* _startThread_lock;     // sync parent and child in thread creation
 126 
 127 public:
 128 
 129   Monitor* startThread_lock() const {
 130     return _startThread_lock;
 131   }
 132 
 133   // ***************************************************************
 134   // Platform dependent initialization and cleanup
 135   // ***************************************************************
 136 
 137 private:
 138 
 139   void pd_initialize();
 140   void pd_destroy();
 141 
 142 // Reconciliation History
 143 // osThread_solaris.hpp 1.24 99/08/27 13:11:54
 144 // End
 145 
 146 #endif // OS_LINUX_VM_OSTHREAD_LINUX_HPP