< prev index next >

src/hotspot/os/solaris/os_solaris.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2017, 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  *


 171   // calls to thr_stksegment.
 172   // It appears that someone (Hotspot?) is trashing the user's
 173   // proc_t structure (note that this is a system struct).
 174   static address _main_stack_base;
 175 
 176   static void print_distro_info(outputStream* st);
 177   static void print_libversion_info(outputStream* st);
 178 
 179  public:
 180   static void libthread_init();
 181   static void synchronization_init();
 182   static bool liblgrp_init();
 183   // This boolean allows users to forward their own non-matching signals
 184   // to JVM_handle_solaris_signal, harmlessly.
 185   static bool signal_handlers_are_installed;
 186 
 187   static void signal_sets_init();
 188   static void install_signal_handlers();
 189   static void set_signal_handler(int sig, bool set_installed, bool oktochain);
 190   static void init_signal_mem();
 191   static bool is_sig_ignored(int sig);
 192   static void set_our_sigflags(int, int);
 193   static int get_our_sigflags(int);
 194 
 195   // For signal-chaining
 196   static bool libjsig_is_loaded; // libjsig that interposes sigaction(),
 197                                  // signal(), sigset() is loaded
 198   static struct sigaction *get_chained_signal_action(int sig);
 199   static bool chained_handler(int sig, siginfo_t *siginfo, void *context);
 200 
 201   // Allows us to switch between lwp and thread -based synchronization
 202   static int mutex_lock(mutex_t *mx)    { return _mutex_lock(mx); }
 203   static int mutex_trylock(mutex_t *mx) { return _mutex_trylock(mx); }
 204   static int mutex_unlock(mutex_t *mx)  { return _mutex_unlock(mx); }
 205   static int mutex_init(mutex_t *mx)    { return _mutex_init(mx, os::Solaris::mutex_scope(), NULL); }
 206   static int mutex_destroy(mutex_t *mx) { return _mutex_destroy(mx); }
 207   static int mutex_scope()              { return _mutex_scope; }
 208 
 209   static void set_mutex_lock(int_fnP_mutex_tP func)      { _mutex_lock = func; }
 210   static void set_mutex_trylock(int_fnP_mutex_tP func)   { _mutex_trylock = func; }
 211   static void set_mutex_unlock(int_fnP_mutex_tP func)    { _mutex_unlock = func; }


   1 /*
   2  * Copyright (c) 1997, 2018, 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  *


 171   // calls to thr_stksegment.
 172   // It appears that someone (Hotspot?) is trashing the user's
 173   // proc_t structure (note that this is a system struct).
 174   static address _main_stack_base;
 175 
 176   static void print_distro_info(outputStream* st);
 177   static void print_libversion_info(outputStream* st);
 178 
 179  public:
 180   static void libthread_init();
 181   static void synchronization_init();
 182   static bool liblgrp_init();
 183   // This boolean allows users to forward their own non-matching signals
 184   // to JVM_handle_solaris_signal, harmlessly.
 185   static bool signal_handlers_are_installed;
 186 
 187   static void signal_sets_init();
 188   static void install_signal_handlers();
 189   static void set_signal_handler(int sig, bool set_installed, bool oktochain);
 190   static void init_signal_mem();

 191   static void set_our_sigflags(int, int);
 192   static int get_our_sigflags(int);
 193 
 194   // For signal-chaining
 195   static bool libjsig_is_loaded; // libjsig that interposes sigaction(),
 196                                  // signal(), sigset() is loaded
 197   static struct sigaction *get_chained_signal_action(int sig);
 198   static bool chained_handler(int sig, siginfo_t *siginfo, void *context);
 199 
 200   // Allows us to switch between lwp and thread -based synchronization
 201   static int mutex_lock(mutex_t *mx)    { return _mutex_lock(mx); }
 202   static int mutex_trylock(mutex_t *mx) { return _mutex_trylock(mx); }
 203   static int mutex_unlock(mutex_t *mx)  { return _mutex_unlock(mx); }
 204   static int mutex_init(mutex_t *mx)    { return _mutex_init(mx, os::Solaris::mutex_scope(), NULL); }
 205   static int mutex_destroy(mutex_t *mx) { return _mutex_destroy(mx); }
 206   static int mutex_scope()              { return _mutex_scope; }
 207 
 208   static void set_mutex_lock(int_fnP_mutex_tP func)      { _mutex_lock = func; }
 209   static void set_mutex_trylock(int_fnP_mutex_tP func)   { _mutex_trylock = func; }
 210   static void set_mutex_unlock(int_fnP_mutex_tP func)    { _mutex_unlock = func; }


< prev index next >