src/cpu/zero/vm/stack_zero.inline.hpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2010 Red Hat, Inc.
  * 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

@@ -21,10 +21,15 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  *
  */
 
+#ifndef CPU_ZERO_VM_STACK_ZERO_INLINE_HPP
+#define CPU_ZERO_VM_STACK_ZERO_INLINE_HPP
+
+#include "runtime/thread.hpp"
+
 // This function should match SharkStack::CreateStackOverflowCheck
 inline void ZeroStack::overflow_check(int required_words, TRAPS) {
   // Check the Zero stack
   if (available_words() < required_words) {
     handle_overflow(THREAD);

@@ -44,5 +49,7 @@
 inline int ZeroStack::abi_stack_available(Thread *thread) const {
   int stack_used = thread->stack_base() - (address) &stack_used;
   int stack_free = thread->stack_size() - stack_used;
   return stack_free - shadow_pages_size();
 }
+
+#endif // CPU_ZERO_VM_STACK_ZERO_INLINE_HPP