1 /*
2 * Copyright (c) 1997, 2008, 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 *
23 */
24
25 inline const char* os::file_separator() { return "/"; }
26 inline const char* os::line_separator() { return "\n"; }
27 inline const char* os::path_separator() { return ":"; }
28
29 inline const char* os::jlong_format_specifier() { return "%lld"; }
30 inline const char* os::julong_format_specifier() { return "%llu"; }
31
32 // File names are case-sensitive on windows only
33 inline int os::file_name_strcmp(const char* s1, const char* s2) {
34 return strcmp(s1, s2);
35 }
36
37 inline bool os::uses_stack_guard_pages() {
38 return true;
39 }
40
41 inline bool os::allocate_stack_guard_pages() {
42 assert(uses_stack_guard_pages(), "sanity check");
43 int r = thr_main() ;
44 guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ;
190 INTERRUPTIBLE_NORESTART(_cmd, _result, _clear); \
191 return _result; \
192 } while(false)
193
194 /* Use the RESTARTABLE macros when interruptible io is not needed */
195
196 #define RESTARTABLE(_cmd, _result) do { \
197 do { \
198 _result = _cmd; \
199 } while((_result == OS_ERR) && (errno == EINTR)); \
200 } while(false)
201
202 #define RESTARTABLE_RETURN_INT(_cmd) do { \
203 int _result; \
204 RESTARTABLE(_cmd, _result); \
205 return _result; \
206 } while(false)
207
208 inline bool os::numa_has_static_binding() { return false; }
209 inline bool os::numa_has_group_homing() { return true; }
|
1 /*
2 * Copyright (c) 1997, 2010, 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 *
23 */
24
25 #ifndef OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP
26 #define OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP
27
28 #include "runtime/atomic.hpp"
29 #include "runtime/os.hpp"
30 #ifdef TARGET_OS_ARCH_solaris_x86
31 # include "atomic_solaris_x86.inline.hpp"
32 # include "orderAccess_solaris_x86.inline.hpp"
33 #endif
34 #ifdef TARGET_OS_ARCH_solaris_sparc
35 # include "atomic_solaris_sparc.inline.hpp"
36 # include "orderAccess_solaris_sparc.inline.hpp"
37 #endif
38
39 inline const char* os::file_separator() { return "/"; }
40 inline const char* os::line_separator() { return "\n"; }
41 inline const char* os::path_separator() { return ":"; }
42
43 inline const char* os::jlong_format_specifier() { return "%lld"; }
44 inline const char* os::julong_format_specifier() { return "%llu"; }
45
46 // File names are case-sensitive on windows only
47 inline int os::file_name_strcmp(const char* s1, const char* s2) {
48 return strcmp(s1, s2);
49 }
50
51 inline bool os::uses_stack_guard_pages() {
52 return true;
53 }
54
55 inline bool os::allocate_stack_guard_pages() {
56 assert(uses_stack_guard_pages(), "sanity check");
57 int r = thr_main() ;
58 guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ;
204 INTERRUPTIBLE_NORESTART(_cmd, _result, _clear); \
205 return _result; \
206 } while(false)
207
208 /* Use the RESTARTABLE macros when interruptible io is not needed */
209
210 #define RESTARTABLE(_cmd, _result) do { \
211 do { \
212 _result = _cmd; \
213 } while((_result == OS_ERR) && (errno == EINTR)); \
214 } while(false)
215
216 #define RESTARTABLE_RETURN_INT(_cmd) do { \
217 int _result; \
218 RESTARTABLE(_cmd, _result); \
219 return _result; \
220 } while(false)
221
222 inline bool os::numa_has_static_binding() { return false; }
223 inline bool os::numa_has_group_homing() { return true; }
224
225 #endif // OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP
|