src/os_cpu/linux_zero/vm/thread_linux_zero.hpp

Print this page


   1 /*
   2  * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 



  26  private:
  27   ZeroStack  _zero_stack;
  28   ZeroFrame* _top_zero_frame;
  29 
  30   void pd_initialize() {
  31     _top_zero_frame = NULL;
  32   }
  33 
  34  public:
  35   ZeroStack *zero_stack() {
  36     return &_zero_stack;
  37   }
  38 
  39  public:
  40   ZeroFrame *top_zero_frame() {
  41     return _top_zero_frame;
  42   }
  43   void push_zero_frame(ZeroFrame *frame) {
  44     *(ZeroFrame **) frame = _top_zero_frame;
  45     _top_zero_frame = frame;


  97  public:
  98   // Check for pending suspend requests and pending asynchronous
  99   // exceptions.  There are separate accessors for these, but
 100   // _suspend_flags is volatile so using them would be unsafe.
 101   bool has_special_condition_for_native_trans() {
 102     return _suspend_flags != 0;
 103   }
 104 
 105  public:
 106   bool pd_get_top_frame_for_signal_handler(frame* fr_addr,
 107                                            void* ucontext,
 108                                            bool isInJava) {
 109     ShouldNotCallThis();
 110   }
 111 
 112   // These routines are only used on cpu architectures that
 113   // have separate register stacks (Itanium).
 114   static bool register_stack_overflow() { return false; }
 115   static void enable_register_stack_guard() {}
 116   static void disable_register_stack_guard() {}


   1 /*
   2  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #ifndef OS_CPU_LINUX_ZERO_VM_THREAD_LINUX_ZERO_HPP
  27 #define OS_CPU_LINUX_ZERO_VM_THREAD_LINUX_ZERO_HPP
  28 
  29  private:
  30   ZeroStack  _zero_stack;
  31   ZeroFrame* _top_zero_frame;
  32 
  33   void pd_initialize() {
  34     _top_zero_frame = NULL;
  35   }
  36 
  37  public:
  38   ZeroStack *zero_stack() {
  39     return &_zero_stack;
  40   }
  41 
  42  public:
  43   ZeroFrame *top_zero_frame() {
  44     return _top_zero_frame;
  45   }
  46   void push_zero_frame(ZeroFrame *frame) {
  47     *(ZeroFrame **) frame = _top_zero_frame;
  48     _top_zero_frame = frame;


 100  public:
 101   // Check for pending suspend requests and pending asynchronous
 102   // exceptions.  There are separate accessors for these, but
 103   // _suspend_flags is volatile so using them would be unsafe.
 104   bool has_special_condition_for_native_trans() {
 105     return _suspend_flags != 0;
 106   }
 107 
 108  public:
 109   bool pd_get_top_frame_for_signal_handler(frame* fr_addr,
 110                                            void* ucontext,
 111                                            bool isInJava) {
 112     ShouldNotCallThis();
 113   }
 114 
 115   // These routines are only used on cpu architectures that
 116   // have separate register stacks (Itanium).
 117   static bool register_stack_overflow() { return false; }
 118   static void enable_register_stack_guard() {}
 119   static void disable_register_stack_guard() {}
 120 
 121 #endif // OS_CPU_LINUX_ZERO_VM_THREAD_LINUX_ZERO_HPP