< prev index next >

src/share/vm/utilities/globalDefinitions_sparcWorks.hpp

Print this page
rev 13110 : imported patch target_macros
   1 /*
   2  * Copyright (c) 1997, 2016, 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  *


 194 // .hpp for the class (os:Solaris usually) that needs them.
 195 
 196 extern "C" {
 197    typedef int (*int_fnP_thread_t_iP_uP_stack_tP_gregset_t)(thread_t, int*, unsigned *, stack_t*, gregset_t);
 198    typedef int (*int_fnP_thread_t_i_gregset_t)(thread_t, int, gregset_t);
 199    typedef int (*int_fnP_thread_t_i)(thread_t, int);
 200    typedef int (*int_fnP_thread_t)(thread_t);
 201 
 202    typedef int (*int_fnP_cond_tP_mutex_tP_timestruc_tP)(cond_t *cv, mutex_t *mx, timestruc_t *abst);
 203    typedef int (*int_fnP_cond_tP_mutex_tP)(cond_t *cv, mutex_t *mx);
 204 
 205    // typedef for missing API in libc
 206    typedef int (*int_fnP_mutex_tP_i_vP)(mutex_t *, int, void *);
 207    typedef int (*int_fnP_mutex_tP)(mutex_t *);
 208    typedef int (*int_fnP_cond_tP_i_vP)(cond_t *cv, int scope, void *arg);
 209    typedef int (*int_fnP_cond_tP)(cond_t *cv);
 210 };
 211 #endif
 212 
 213 //----------------------------------------------------------------------------------------------------
 214 // Debugging
 215 
 216 #define DEBUG_EXCEPTION ::abort();
 217 
 218 extern "C" void breakpoint();
 219 #define BREAKPOINT ::breakpoint()
 220 
 221 // checking for nanness
 222 #ifdef SOLARIS
 223 #ifdef SPARC
 224 inline int g_isnan(float  f) { return isnanf(f); }
 225 #else
 226 // isnanf() broken on Intel Solaris use isnand()
 227 inline int g_isnan(float  f) { return isnand(f); }
 228 #endif
 229 
 230 inline int g_isnan(double f) { return isnand(f); }
 231 #elif LINUX
 232 inline int g_isnan(float  f) { return isnanf(f); }
 233 inline int g_isnan(double f) { return isnan(f); }
 234 #else
 235 #error "missing platform-specific definition here"
 236 #endif
 237 
 238 // Checking for finiteness
 239 


   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  *


 194 // .hpp for the class (os:Solaris usually) that needs them.
 195 
 196 extern "C" {
 197    typedef int (*int_fnP_thread_t_iP_uP_stack_tP_gregset_t)(thread_t, int*, unsigned *, stack_t*, gregset_t);
 198    typedef int (*int_fnP_thread_t_i_gregset_t)(thread_t, int, gregset_t);
 199    typedef int (*int_fnP_thread_t_i)(thread_t, int);
 200    typedef int (*int_fnP_thread_t)(thread_t);
 201 
 202    typedef int (*int_fnP_cond_tP_mutex_tP_timestruc_tP)(cond_t *cv, mutex_t *mx, timestruc_t *abst);
 203    typedef int (*int_fnP_cond_tP_mutex_tP)(cond_t *cv, mutex_t *mx);
 204 
 205    // typedef for missing API in libc
 206    typedef int (*int_fnP_mutex_tP_i_vP)(mutex_t *, int, void *);
 207    typedef int (*int_fnP_mutex_tP)(mutex_t *);
 208    typedef int (*int_fnP_cond_tP_i_vP)(cond_t *cv, int scope, void *arg);
 209    typedef int (*int_fnP_cond_tP)(cond_t *cv);
 210 };
 211 #endif
 212 
 213 //----------------------------------------------------------------------------------------------------






 214 
 215 // checking for nanness
 216 #ifdef SOLARIS
 217 #ifdef SPARC
 218 inline int g_isnan(float  f) { return isnanf(f); }
 219 #else
 220 // isnanf() broken on Intel Solaris use isnand()
 221 inline int g_isnan(float  f) { return isnand(f); }
 222 #endif
 223 
 224 inline int g_isnan(double f) { return isnand(f); }
 225 #elif LINUX
 226 inline int g_isnan(float  f) { return isnanf(f); }
 227 inline int g_isnan(double f) { return isnan(f); }
 228 #else
 229 #error "missing platform-specific definition here"
 230 #endif
 231 
 232 // Checking for finiteness
 233 


< prev index next >