author | amurillo |
Fri, 05 Dec 2014 16:36:07 -0800 | |
changeset 27926 | 0e2e188ab887 |
parent 27400 | c5955f4b7c84 |
child 30198 | ec621727bd41 |
permissions | -rw-r--r-- |
22831
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
1 |
/* |
25468
5331df506290
8048241: Introduce umbrella header os.inline.hpp and clean up includes
goetz
parents:
24351
diff
changeset
|
2 |
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
22831
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
3 |
* Copyright 2012, 2013 SAP AG. All rights reserved. |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
4 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
5 |
* |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
6 |
* This code is free software; you can redistribute it and/or modify it |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
7 |
* under the terms of the GNU General Public License version 2 only, as |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
8 |
* published by the Free Software Foundation. |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
9 |
* |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
14 |
* accompanied this code). |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
15 |
* |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
16 |
* You should have received a copy of the GNU General Public License version |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation, |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
19 |
* |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
21 |
* or visit www.oracle.com if you need additional information or have any |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
22 |
* questions. |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
23 |
* |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
24 |
*/ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
25 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
26 |
#ifndef OS_AIX_VM_OS_AIX_INLINE_HPP |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
27 |
#define OS_AIX_VM_OS_AIX_INLINE_HPP |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
28 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
29 |
#include "runtime/os.hpp" |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
30 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
31 |
// System includes |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
32 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
33 |
#include <unistd.h> |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
34 |
#include <sys/socket.h> |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
35 |
#include <sys/poll.h> |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
36 |
#include <sys/ioctl.h> |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
37 |
#include <netdb.h> |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
38 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
39 |
inline void* os::thread_local_storage_at(int index) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
40 |
return pthread_getspecific((pthread_key_t)index); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
41 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
42 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
43 |
// File names are case-sensitive on windows only |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
44 |
inline int os::file_name_strcmp(const char* s1, const char* s2) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
45 |
return strcmp(s1, s2); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
46 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
47 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
48 |
inline bool os::obsolete_option(const JavaVMOption *option) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
49 |
return false; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
50 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
51 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
52 |
inline bool os::uses_stack_guard_pages() { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
53 |
return true; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
54 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
55 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
56 |
inline bool os::allocate_stack_guard_pages() { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
57 |
assert(uses_stack_guard_pages(), "sanity check"); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
58 |
return true; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
59 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
60 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
61 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
62 |
// On Aix, reservations are made on a page by page basis, nothing to do. |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
63 |
inline void os::pd_split_reserved_memory(char *base, size_t size, |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
64 |
size_t split, bool realloc) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
65 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
66 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
67 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
68 |
// Bang the shadow pages if they need to be touched to be mapped. |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
69 |
inline void os::bang_stack_shadow_pages() { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
70 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
71 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
72 |
inline void os::dll_unload(void *lib) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
73 |
::dlclose(lib); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
74 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
75 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
76 |
inline const int os::default_file_open_flags() { return 0;} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
77 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
78 |
inline DIR* os::opendir(const char* dirname) |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
79 |
{ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
80 |
assert(dirname != NULL, "just checking"); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
81 |
return ::opendir(dirname); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
82 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
83 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
84 |
inline int os::readdir_buf_size(const char *path) |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
85 |
{ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
86 |
// according to aix sys/limits, NAME_MAX must be retrieved at runtime. */ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
87 |
const long my_NAME_MAX = pathconf(path, _PC_NAME_MAX); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
88 |
return my_NAME_MAX + sizeof(dirent) + 1; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
89 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
90 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
91 |
inline jlong os::lseek(int fd, jlong offset, int whence) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
92 |
return (jlong) ::lseek64(fd, offset, whence); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
93 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
94 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
95 |
inline int os::fsync(int fd) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
96 |
return ::fsync(fd); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
97 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
98 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
99 |
inline char* os::native_path(char *path) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
100 |
return path; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
101 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
102 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
103 |
inline int os::ftruncate(int fd, jlong length) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
104 |
return ::ftruncate64(fd, length); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
105 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
106 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
107 |
inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf) |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
108 |
{ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
109 |
dirent* p; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
110 |
int status; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
111 |
assert(dirp != NULL, "just checking"); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
112 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
113 |
// NOTE: Linux readdir_r (on RH 6.2 and 7.2 at least) is NOT like the POSIX |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
114 |
// version. Here is the doc for this function: |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
115 |
// http://www.gnu.org/manual/glibc-2.2.3/html_node/libc_262.html |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
116 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
117 |
if((status = ::readdir_r(dirp, dbuf, &p)) != 0) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
118 |
errno = status; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
119 |
return NULL; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
120 |
} else |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
121 |
return p; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
122 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
123 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
124 |
inline int os::closedir(DIR *dirp) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
125 |
assert(dirp != NULL, "argument is NULL"); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
126 |
return ::closedir(dirp); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
127 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
128 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
129 |
// macros for restartable system calls |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
130 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
131 |
#define RESTARTABLE(_cmd, _result) do { \ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
132 |
_result = _cmd; \ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
133 |
} while(((int)_result == OS_ERR) && (errno == EINTR)) |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
134 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
135 |
#define RESTARTABLE_RETURN_INT(_cmd) do { \ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
136 |
int _result; \ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
137 |
RESTARTABLE(_cmd, _result); \ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
138 |
return _result; \ |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
139 |
} while(false) |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
140 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
141 |
// We don't have NUMA support on Aix, but we need this for compilation. |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
142 |
inline bool os::numa_has_static_binding() { ShouldNotReachHere(); return true; } |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
143 |
inline bool os::numa_has_group_homing() { ShouldNotReachHere(); return false; } |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
144 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
145 |
inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
146 |
size_t res; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
147 |
RESTARTABLE( (size_t) ::read(fd, buf, (size_t) nBytes), res); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
148 |
return res; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
149 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
150 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
151 |
inline size_t os::write(int fd, const void *buf, unsigned int nBytes) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
152 |
size_t res; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
153 |
RESTARTABLE((size_t) ::write(fd, buf, (size_t) nBytes), res); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
154 |
return res; |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
155 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
156 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
157 |
inline int os::close(int fd) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
158 |
return ::close(fd); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
159 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
160 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
161 |
inline int os::socket_close(int fd) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
162 |
return ::close(fd); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
163 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
164 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
165 |
inline int os::socket(int domain, int type, int protocol) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
166 |
return ::socket(domain, type, protocol); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
167 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
168 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
169 |
inline int os::recv(int fd, char* buf, size_t nBytes, uint flags) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
170 |
RESTARTABLE_RETURN_INT(::recv(fd, buf, nBytes, flags)); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
171 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
172 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
173 |
inline int os::send(int fd, char* buf, size_t nBytes, uint flags) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
174 |
RESTARTABLE_RETURN_INT(::send(fd, buf, nBytes, flags)); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
175 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
176 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
177 |
inline int os::raw_send(int fd, char* buf, size_t nBytes, uint flags) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
178 |
return os::send(fd, buf, nBytes, flags); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
179 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
180 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
181 |
inline int os::connect(int fd, struct sockaddr* him, socklen_t len) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
182 |
RESTARTABLE_RETURN_INT(::connect(fd, him, len)); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
183 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
184 |
|
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
185 |
inline struct hostent* os::get_host_by_name(char* name) { |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
186 |
return ::gethostbyname(name); |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
187 |
} |
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
188 |
|
23213
141e27fa5a42
8036777: AIX: Adapt implementation after '6546236: Thread interrupt() of Thread.sleep() can be lost on Solaris.'
simonis
parents:
22831
diff
changeset
|
189 |
inline bool os::supports_monotonic_clock() { |
141e27fa5a42
8036777: AIX: Adapt implementation after '6546236: Thread interrupt() of Thread.sleep() can be lost on Solaris.'
simonis
parents:
22831
diff
changeset
|
190 |
// mread_real_time() is monotonic on AIX (see os::javaTimeNanos() comments) |
141e27fa5a42
8036777: AIX: Adapt implementation after '6546236: Thread interrupt() of Thread.sleep() can be lost on Solaris.'
simonis
parents:
22831
diff
changeset
|
191 |
return true; |
141e27fa5a42
8036777: AIX: Adapt implementation after '6546236: Thread interrupt() of Thread.sleep() can be lost on Solaris.'
simonis
parents:
22831
diff
changeset
|
192 |
} |
141e27fa5a42
8036777: AIX: Adapt implementation after '6546236: Thread interrupt() of Thread.sleep() can be lost on Solaris.'
simonis
parents:
22831
diff
changeset
|
193 |
|
26682
f339669ba825
8057744: (process) Synchronize exiting of threads and process [win]
igerasim
parents:
25725
diff
changeset
|
194 |
inline void os::exit(int num) { |
f339669ba825
8057744: (process) Synchronize exiting of threads and process [win]
igerasim
parents:
25725
diff
changeset
|
195 |
::exit(num); |
f339669ba825
8057744: (process) Synchronize exiting of threads and process [win]
igerasim
parents:
25725
diff
changeset
|
196 |
} |
f339669ba825
8057744: (process) Synchronize exiting of threads and process [win]
igerasim
parents:
25725
diff
changeset
|
197 |
|
22831
1e2ba1d62103
8023038: PPC64 (part 15): Platform files for AIX/PPC64 support
simonis
parents:
diff
changeset
|
198 |
#endif // OS_AIX_VM_OS_AIX_INLINE_HPP |