1 /*
2 * Copyright (c) 1998, 2014, 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 *
203 typedef int (*int_fnP_thread_t_i_gregset_t)(thread_t, int, gregset_t);
204 typedef int (*int_fnP_thread_t_i)(thread_t, int);
205 typedef int (*int_fnP_thread_t)(thread_t);
206
207 typedef int (*int_fnP_cond_tP_mutex_tP_timestruc_tP)(cond_t *cv, mutex_t *mx, timestruc_t *abst);
208 typedef int (*int_fnP_cond_tP_mutex_tP)(cond_t *cv, mutex_t *mx);
209
210 // typedef for missing API in libc
211 typedef int (*int_fnP_mutex_tP_i_vP)(mutex_t *, int, void *);
212 typedef int (*int_fnP_mutex_tP)(mutex_t *);
213 typedef int (*int_fnP_cond_tP_i_vP)(cond_t *cv, int scope, void *arg);
214 typedef int (*int_fnP_cond_tP)(cond_t *cv);
215 };
216 #endif // SOLARIS
217
218 //----------------------------------------------------------------------------------------------------
219 // Debugging
220
221 #define DEBUG_EXCEPTION ::abort();
222
223 #ifdef ARM
224 #ifdef SOLARIS
225 #define BREAKPOINT __asm__ volatile (".long 0xe1200070")
226 #else
227 #define BREAKPOINT __asm__ volatile (".long 0xe7f001f0")
228 #endif
229 #else
230 extern "C" void breakpoint();
231 #define BREAKPOINT ::breakpoint()
232 #endif
233
234 // checking for nanness
235 #ifdef SOLARIS
236 #ifdef SPARC
237 inline int g_isnan(float f) { return isnanf(f); }
238 #else
239 // isnanf() broken on Intel Solaris use isnand()
240 inline int g_isnan(float f) { return isnand(f); }
241 #endif
242 inline int g_isnan(double f) { return isnand(f); }
243 #elif defined(__APPLE__)
|
1 /*
2 * Copyright (c) 1998, 2015, 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 *
203 typedef int (*int_fnP_thread_t_i_gregset_t)(thread_t, int, gregset_t);
204 typedef int (*int_fnP_thread_t_i)(thread_t, int);
205 typedef int (*int_fnP_thread_t)(thread_t);
206
207 typedef int (*int_fnP_cond_tP_mutex_tP_timestruc_tP)(cond_t *cv, mutex_t *mx, timestruc_t *abst);
208 typedef int (*int_fnP_cond_tP_mutex_tP)(cond_t *cv, mutex_t *mx);
209
210 // typedef for missing API in libc
211 typedef int (*int_fnP_mutex_tP_i_vP)(mutex_t *, int, void *);
212 typedef int (*int_fnP_mutex_tP)(mutex_t *);
213 typedef int (*int_fnP_cond_tP_i_vP)(cond_t *cv, int scope, void *arg);
214 typedef int (*int_fnP_cond_tP)(cond_t *cv);
215 };
216 #endif // SOLARIS
217
218 //----------------------------------------------------------------------------------------------------
219 // Debugging
220
221 #define DEBUG_EXCEPTION ::abort();
222
223 #ifdef ARM32
224 #ifdef SOLARIS
225 #define BREAKPOINT __asm__ volatile (".long 0xe1200070")
226 #else
227 #define BREAKPOINT __asm__ volatile (".long 0xe7f001f0")
228 #endif
229 #else
230 extern "C" void breakpoint();
231 #define BREAKPOINT ::breakpoint()
232 #endif
233
234 // checking for nanness
235 #ifdef SOLARIS
236 #ifdef SPARC
237 inline int g_isnan(float f) { return isnanf(f); }
238 #else
239 // isnanf() broken on Intel Solaris use isnand()
240 inline int g_isnan(float f) { return isnand(f); }
241 #endif
242 inline int g_isnan(double f) { return isnand(f); }
243 #elif defined(__APPLE__)
|