< prev index next >

src/os/bsd/vm/os_bsd.hpp

Print this page




  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_BSD_VM_OS_BSD_HPP
  26 #define OS_BSD_VM_OS_BSD_HPP
  27 
  28 // Bsd_OS defines the interface to Bsd operating systems
  29 
  30 // Information about the protection of the page at address '0' on this os.
  31 static bool zero_page_read_protected() { return true; }
  32 
  33 #ifdef __APPLE__
  34 // Mac OS X doesn't support clock_gettime. Stub out the type, it is
  35 // unused
  36 typedef int clockid_t;
  37 #endif
  38 
  39 class Bsd {
  40   friend class os;
  41 
  42   // For signal-chaining
  43   static bool libjsig_is_loaded;        // libjsig that interposes sigaction(),
  44                                         // __sigaction(), signal() is loaded
  45   static struct sigaction *(*get_signal_action)(int);
  46   static struct sigaction *get_preinstalled_handler(int);
  47   static void save_preinstalled_handler(int, struct sigaction&);
  48 
  49   static void check_signal_handler(int sig);
  50 
  51 #ifdef __APPLE__
  52   // mach_absolute_time
  53   static mach_timebase_info_data_t _timebase_info;
  54   static volatile uint64_t         _max_abstime;
  55 #else
  56   static int (*_clock_gettime)(clockid_t, struct timespec *);
  57 #endif
  58 




  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_BSD_VM_OS_BSD_HPP
  26 #define OS_BSD_VM_OS_BSD_HPP
  27 
  28 // Bsd_OS defines the interface to Bsd operating systems
  29 
  30 // Information about the protection of the page at address '0' on this os.
  31 static bool zero_page_read_protected() { return true; }
  32 






  33 class Bsd {
  34   friend class os;
  35 
  36   // For signal-chaining
  37   static bool libjsig_is_loaded;        // libjsig that interposes sigaction(),
  38                                         // __sigaction(), signal() is loaded
  39   static struct sigaction *(*get_signal_action)(int);
  40   static struct sigaction *get_preinstalled_handler(int);
  41   static void save_preinstalled_handler(int, struct sigaction&);
  42 
  43   static void check_signal_handler(int sig);
  44 
  45 #ifdef __APPLE__
  46   // mach_absolute_time
  47   static mach_timebase_info_data_t _timebase_info;
  48   static volatile uint64_t         _max_abstime;
  49 #else
  50   static int (*_clock_gettime)(clockid_t, struct timespec *);
  51 #endif
  52 


< prev index next >