hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
changeset 32080 9d2ace436482
parent 29573 2d800e5d575f
child 33105 294e48b4f704
equal deleted inserted replaced
32079:654a242d6dc8 32080:9d2ace436482
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   778 ////////////////////////////////////////////////////////////////////////////////
   778 ////////////////////////////////////////////////////////////////////////////////
   779 // thread stack
   779 // thread stack
   780 
   780 
   781 #ifdef AMD64
   781 #ifdef AMD64
   782 size_t os::Bsd::min_stack_allowed  = 64 * K;
   782 size_t os::Bsd::min_stack_allowed  = 64 * K;
   783 
       
   784 // amd64: pthread on amd64 is always in floating stack mode
       
   785 bool os::Bsd::supports_variable_stack_size() {  return true; }
       
   786 #else
   783 #else
   787 size_t os::Bsd::min_stack_allowed  =  (48 DEBUG_ONLY(+4))*K;
   784 size_t os::Bsd::min_stack_allowed  =  (48 DEBUG_ONLY(+4))*K;
   788 
   785 
   789 #ifdef __GNUC__
   786 #ifdef __GNUC__
   790 #define GET_GS() ({int gs; __asm__ volatile("movw %%gs, %w0":"=q"(gs)); gs&0xffff;})
   787 #define GET_GS() ({int gs; __asm__ volatile("movw %%gs, %w0":"=q"(gs)); gs&0xffff;})
   791 #endif
   788 #endif
   792 
   789 
   793 bool os::Bsd::supports_variable_stack_size() { return true; }
       
   794 #endif // AMD64
   790 #endif // AMD64
   795 
   791 
   796 // return default stack size for thr_type
   792 // return default stack size for thr_type
   797 size_t os::Bsd::default_stack_size(os::ThreadType thr_type) {
   793 size_t os::Bsd::default_stack_size(os::ThreadType thr_type) {
   798   // default stack size (compiler thread needs larger stack)
   794   // default stack size (compiler thread needs larger stack)