47
48 inline bool os::obsolete_option(const JavaVMOption *option) {
49 return false;
50 }
51
52 inline bool os::uses_stack_guard_pages() {
53 return true;
54 }
55
56 // Whether or not calling code should/can commit/uncommit stack pages
57 // before guarding them. Answer for AIX is definitly no, because memory
58 // is automatically committed on touch.
59 inline bool os::allocate_stack_guard_pages() {
60 assert(uses_stack_guard_pages(), "sanity check");
61 return false;
62 }
63
64 // On Aix, reservations are made on a page by page basis, nothing to do.
65 inline void os::pd_split_reserved_memory(char *base, size_t size,
66 size_t split, bool realloc) {
67 }
68
69 // Bang the shadow pages if they need to be touched to be mapped.
70 inline void os::bang_stack_shadow_pages() {
71 }
72
73 inline void os::dll_unload(void *lib) {
74 ::dlclose(lib);
75 }
76
77 inline const int os::default_file_open_flags() { return 0;}
78
79 inline DIR* os::opendir(const char* dirname) {
80 assert(dirname != NULL, "just checking");
81 return ::opendir(dirname);
82 }
83
84 inline int os::readdir_buf_size(const char *path) {
85 // According to aix sys/limits, NAME_MAX must be retrieved at runtime.
86 const long my_NAME_MAX = pathconf(path, _PC_NAME_MAX);
139 // We don't have NUMA support on Aix, but we need this for compilation.
140 inline bool os::numa_has_static_binding() { ShouldNotReachHere(); return true; }
141 inline bool os::numa_has_group_homing() { ShouldNotReachHere(); return false; }
142
143 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
144 size_t res;
145 RESTARTABLE( (size_t) ::read(fd, buf, (size_t) nBytes), res);
146 return res;
147 }
148
149 inline size_t os::write(int fd, const void *buf, unsigned int nBytes) {
150 size_t res;
151 RESTARTABLE((size_t) ::write(fd, buf, (size_t) nBytes), res);
152 return res;
153 }
154
155 inline int os::close(int fd) {
156 return ::close(fd);
157 }
158
159 inline int os::socket_close(int fd) {
160 return ::close(fd);
161 }
162
163 inline int os::socket(int domain, int type, int protocol) {
164 return ::socket(domain, type, protocol);
165 }
166
167 inline int os::recv(int fd, char* buf, size_t nBytes, uint flags) {
168 RESTARTABLE_RETURN_INT(::recv(fd, buf, nBytes, flags));
169 }
170
171 inline int os::send(int fd, char* buf, size_t nBytes, uint flags) {
172 RESTARTABLE_RETURN_INT(::send(fd, buf, nBytes, flags));
173 }
174
175 inline int os::raw_send(int fd, char *buf, size_t nBytes, uint flags) {
176 return os::send(fd, buf, nBytes, flags);
177 }
178
179 inline int os::connect(int fd, struct sockaddr *him, socklen_t len) {
180 RESTARTABLE_RETURN_INT(::connect(fd, him, len));
181 }
182
183 inline struct hostent* os::get_host_by_name(char* name) {
184 return ::gethostbyname(name);
|
47
48 inline bool os::obsolete_option(const JavaVMOption *option) {
49 return false;
50 }
51
52 inline bool os::uses_stack_guard_pages() {
53 return true;
54 }
55
56 // Whether or not calling code should/can commit/uncommit stack pages
57 // before guarding them. Answer for AIX is definitly no, because memory
58 // is automatically committed on touch.
59 inline bool os::allocate_stack_guard_pages() {
60 assert(uses_stack_guard_pages(), "sanity check");
61 return false;
62 }
63
64 // On Aix, reservations are made on a page by page basis, nothing to do.
65 inline void os::pd_split_reserved_memory(char *base, size_t size,
66 size_t split, bool realloc) {
67 // TODO: Determine whether Sys V memory is split. If yes, we need to treat
68 // this the same way Windows treats its VirtualAlloc allocations.
69 }
70
71 // Bang the shadow pages if they need to be touched to be mapped.
72 inline void os::bang_stack_shadow_pages() {
73 }
74
75 inline void os::dll_unload(void *lib) {
76 ::dlclose(lib);
77 }
78
79 inline const int os::default_file_open_flags() { return 0;}
80
81 inline DIR* os::opendir(const char* dirname) {
82 assert(dirname != NULL, "just checking");
83 return ::opendir(dirname);
84 }
85
86 inline int os::readdir_buf_size(const char *path) {
87 // According to aix sys/limits, NAME_MAX must be retrieved at runtime.
88 const long my_NAME_MAX = pathconf(path, _PC_NAME_MAX);
141 // We don't have NUMA support on Aix, but we need this for compilation.
142 inline bool os::numa_has_static_binding() { ShouldNotReachHere(); return true; }
143 inline bool os::numa_has_group_homing() { ShouldNotReachHere(); return false; }
144
145 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
146 size_t res;
147 RESTARTABLE( (size_t) ::read(fd, buf, (size_t) nBytes), res);
148 return res;
149 }
150
151 inline size_t os::write(int fd, const void *buf, unsigned int nBytes) {
152 size_t res;
153 RESTARTABLE((size_t) ::write(fd, buf, (size_t) nBytes), res);
154 return res;
155 }
156
157 inline int os::close(int fd) {
158 return ::close(fd);
159 }
160
161 inline int os::socket(int domain, int type, int protocol) {
162 return ::socket(domain, type, protocol);
163 }
164
165 inline int os::socket_close(int fd) {
166 return ::close(fd);
167 }
168
169 inline int os::recv(int fd, char* buf, size_t nBytes, uint flags) {
170 RESTARTABLE_RETURN_INT(::recv(fd, buf, nBytes, flags));
171 }
172
173 inline int os::send(int fd, char* buf, size_t nBytes, uint flags) {
174 RESTARTABLE_RETURN_INT(::send(fd, buf, nBytes, flags));
175 }
176
177 inline int os::raw_send(int fd, char *buf, size_t nBytes, uint flags) {
178 return os::send(fd, buf, nBytes, flags);
179 }
180
181 inline int os::connect(int fd, struct sockaddr *him, socklen_t len) {
182 RESTARTABLE_RETURN_INT(::connect(fd, him, len));
183 }
184
185 inline struct hostent* os::get_host_by_name(char* name) {
186 return ::gethostbyname(name);
|