src/os/bsd/vm/os_bsd.hpp

changeset 4229
0af5da0c9d9d
parent 4017
fa9253dcd4df
child 4675
63e54c37ac64
     1.1 --- a/src/os/bsd/vm/os_bsd.hpp	Thu Oct 25 16:33:40 2012 -0400
     1.2 +++ b/src/os/bsd/vm/os_bsd.hpp	Mon Oct 29 21:04:17 2012 +0100
     1.3 @@ -56,19 +56,6 @@
     1.4    static int sigflags[MAXSIGNUM];
     1.5  
     1.6    static int (*_clock_gettime)(clockid_t, struct timespec *);
     1.7 -#ifndef _ALLBSD_SOURCE
     1.8 -  static int (*_pthread_getcpuclockid)(pthread_t, clockid_t *);
     1.9 -
    1.10 -  static address   _initial_thread_stack_bottom;
    1.11 -  static uintptr_t _initial_thread_stack_size;
    1.12 -
    1.13 -  static const char *_glibc_version;
    1.14 -  static const char *_libpthread_version;
    1.15 -
    1.16 -  static bool _is_floating_stack;
    1.17 -  static bool _is_NPTL;
    1.18 -  static bool _supports_fast_thread_cpu_time;
    1.19 -#endif
    1.20  
    1.21    static GrowableArray<int>* _cpu_to_node;
    1.22  
    1.23 @@ -76,28 +63,14 @@
    1.24  
    1.25    static julong _physical_memory;
    1.26    static pthread_t _main_thread;
    1.27 -#ifndef _ALLBSD_SOURCE
    1.28 -  static Mutex* _createThread_lock;
    1.29 -#endif
    1.30    static int _page_size;
    1.31  
    1.32    static julong available_memory();
    1.33    static julong physical_memory() { return _physical_memory; }
    1.34    static void initialize_system_info();
    1.35  
    1.36 -#ifndef _ALLBSD_SOURCE
    1.37 -  static void set_glibc_version(const char *s)      { _glibc_version = s; }
    1.38 -  static void set_libpthread_version(const char *s) { _libpthread_version = s; }
    1.39 -#endif
    1.40 -
    1.41    static bool supports_variable_stack_size();
    1.42  
    1.43 -#ifndef _ALLBSD_SOURCE
    1.44 -  static void set_is_NPTL()                   { _is_NPTL = true;  }
    1.45 -  static void set_is_BsdThreads()           { _is_NPTL = false; }
    1.46 -  static void set_is_floating_stack()         { _is_floating_stack = true; }
    1.47 -#endif
    1.48 -
    1.49    static void rebuild_cpu_to_node_map();
    1.50    static GrowableArray<int>* cpu_to_node()    { return _cpu_to_node; }
    1.51  
    1.52 @@ -106,25 +79,10 @@
    1.53   public:
    1.54  
    1.55    static void init_thread_fpu_state();
    1.56 -#ifndef _ALLBSD_SOURCE
    1.57 -  static int  get_fpu_control_word();
    1.58 -  static void set_fpu_control_word(int fpu_control);
    1.59 -#endif
    1.60    static pthread_t main_thread(void)                                { return _main_thread; }
    1.61  
    1.62 -#ifndef _ALLBSD_SOURCE
    1.63 -  // returns kernel thread id (similar to LWP id on Solaris), which can be
    1.64 -  // used to access /proc
    1.65 -  static pid_t gettid();
    1.66 -  static void set_createThread_lock(Mutex* lk)                      { _createThread_lock = lk; }
    1.67 -  static Mutex* createThread_lock(void)                             { return _createThread_lock; }
    1.68 -#endif
    1.69    static void hotspot_sigmask(Thread* thread);
    1.70  
    1.71 -#ifndef _ALLBSD_SOURCE
    1.72 -  static address   initial_thread_stack_bottom(void)                { return _initial_thread_stack_bottom; }
    1.73 -  static uintptr_t initial_thread_stack_size(void)                  { return _initial_thread_stack_size; }
    1.74 -#endif
    1.75    static bool is_initial_thread(void);
    1.76  
    1.77    static int page_size(void)                                        { return _page_size; }
    1.78 @@ -161,23 +119,6 @@
    1.79    static struct sigaction *get_chained_signal_action(int sig);
    1.80    static bool chained_handler(int sig, siginfo_t* siginfo, void* context);
    1.81  
    1.82 -#ifndef _ALLBSD_SOURCE
    1.83 -  // GNU libc and libpthread version strings
    1.84 -  static const char *glibc_version()          { return _glibc_version; }
    1.85 -  static const char *libpthread_version()     { return _libpthread_version; }
    1.86 -
    1.87 -  // NPTL or BsdThreads?
    1.88 -  static bool is_BsdThreads()               { return !_is_NPTL; }
    1.89 -  static bool is_NPTL()                       { return _is_NPTL;  }
    1.90 -
    1.91 -  // NPTL is always floating stack. BsdThreads could be using floating
    1.92 -  // stack or fixed stack.
    1.93 -  static bool is_floating_stack()             { return _is_floating_stack; }
    1.94 -
    1.95 -  static void libpthread_init();
    1.96 -  static bool libnuma_init();
    1.97 -  static void* libnuma_dlsym(void* handle, const char* name);
    1.98 -#endif
    1.99    // Minimum stack size a thread can be created with (allowing
   1.100    // the VM to completely create the thread and enter user code)
   1.101    static size_t min_stack_allowed;
   1.102 @@ -186,22 +127,9 @@
   1.103    static size_t default_stack_size(os::ThreadType thr_type);
   1.104    static size_t default_guard_size(os::ThreadType thr_type);
   1.105  
   1.106 -#ifndef _ALLBSD_SOURCE
   1.107 -  static void capture_initial_stack(size_t max_size);
   1.108 -
   1.109 -  // Stack overflow handling
   1.110 -  static bool manually_expand_stack(JavaThread * t, address addr);
   1.111 -  static int max_register_window_saves_before_flushing();
   1.112 -#endif
   1.113 -
   1.114    // Real-time clock functions
   1.115    static void clock_init(void);
   1.116  
   1.117 -#ifndef _ALLBSD_SOURCE
   1.118 -  // fast POSIX clocks support
   1.119 -  static void fast_thread_clock_init(void);
   1.120 -#endif
   1.121 -
   1.122    static inline bool supports_monotonic_clock() {
   1.123      return _clock_gettime != NULL;
   1.124    }
   1.125 @@ -210,18 +138,6 @@
   1.126      return _clock_gettime ? _clock_gettime(clock_id, tp) : -1;
   1.127    }
   1.128  
   1.129 -#ifndef _ALLBSD_SOURCE
   1.130 -  static int pthread_getcpuclockid(pthread_t tid, clockid_t *clock_id) {
   1.131 -    return _pthread_getcpuclockid ? _pthread_getcpuclockid(tid, clock_id) : -1;
   1.132 -  }
   1.133 -
   1.134 -  static bool supports_fast_thread_cpu_time() {
   1.135 -    return _supports_fast_thread_cpu_time;
   1.136 -  }
   1.137 -
   1.138 -  static jlong fast_thread_cpu_time(clockid_t clockid);
   1.139 -#endif
   1.140 -
   1.141    // Stack repair handling
   1.142  
   1.143    // none present

mercurial