75 return true; 76 } 77 78 79 // On Aix, reservations are made on a page by page basis, nothing to do. 80 inline void os::pd_split_reserved_memory(char *base, size_t size, 81 size_t split, bool realloc) { 82 } 83 84 85 // Bang the shadow pages if they need to be touched to be mapped. 86 inline void os::bang_stack_shadow_pages() { 87 } 88 89 inline void os::dll_unload(void *lib) { 90 ::dlclose(lib); 91 } 92 93 inline const int os::default_file_open_flags() { return 0;} 94 95 inline DIR* os::opendir(const char* dirname) 96 { 97 assert(dirname != NULL, "just checking"); 98 return ::opendir(dirname); 99 } 100 101 inline int os::readdir_buf_size(const char *path) 102 { 103 // according to aix sys/limits, NAME_MAX must be retrieved at runtime. */ 104 const long my_NAME_MAX = pathconf(path, _PC_NAME_MAX); 105 return my_NAME_MAX + sizeof(dirent) + 1; 106 } 107 108 inline jlong os::lseek(int fd, jlong offset, int whence) { 109 return (jlong) ::lseek64(fd, offset, whence); 110 } 111 112 inline int os::fsync(int fd) { 113 return ::fsync(fd); 114 } 115 116 inline char* os::native_path(char *path) { 117 return path; 118 } 119 120 inline int os::ftruncate(int fd, jlong length) { 121 return ::ftruncate64(fd, length); 122 } 123 124 inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf) 125 { 126 dirent* p; 127 int status; 128 assert(dirp != NULL, "just checking"); 129 130 // NOTE: Linux readdir_r (on RH 6.2 and 7.2 at least) is NOT like the POSIX 131 // version. Here is the doc for this function: 132 // http://www.gnu.org/manual/glibc-2.2.3/html_node/libc_262.html 133 134 if((status = ::readdir_r(dirp, dbuf, &p)) != 0) { 135 errno = status; 136 return NULL; 137 } else 138 return p; 139 } 140 141 inline int os::closedir(DIR *dirp) { 142 assert(dirp != NULL, "argument is NULL"); 143 return ::closedir(dirp); 144 } 145 146 // macros for restartable system calls 147 148 #define RESTARTABLE(_cmd, _result) do { \ 149 _result = _cmd; \ 150 } while(((int)_result == OS_ERR) && (errno == EINTR)) 151 152 #define RESTARTABLE_RETURN_INT(_cmd) do { \ 153 int _result; \ 154 RESTARTABLE(_cmd, _result); \ 155 return _result; \ 156 } while(false) 157 158 // We don't have NUMA support on Aix, but we need this for compilation. 159 inline bool os::numa_has_static_binding() { ShouldNotReachHere(); return true; } 160 inline bool os::numa_has_group_homing() { ShouldNotReachHere(); return false; } 161 162 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) { 163 size_t res; | 75 return true; 76 } 77 78 79 // On Aix, reservations are made on a page by page basis, nothing to do. 80 inline void os::pd_split_reserved_memory(char *base, size_t size, 81 size_t split, bool realloc) { 82 } 83 84 85 // Bang the shadow pages if they need to be touched to be mapped. 86 inline void os::bang_stack_shadow_pages() { 87 } 88 89 inline void os::dll_unload(void *lib) { 90 ::dlclose(lib); 91 } 92 93 inline const int os::default_file_open_flags() { return 0;} 94 95 inline jlong os::lseek(int fd, jlong offset, int whence) { 96 return (jlong) ::lseek64(fd, offset, whence); 97 } 98 99 inline int os::fsync(int fd) { 100 return ::fsync(fd); 101 } 102 103 inline char* os::native_path(char *path) { 104 return path; 105 } 106 107 inline int os::ftruncate(int fd, jlong length) { 108 return ::ftruncate64(fd, length); 109 } 110 111 // macros for restartable system calls 112 113 #define RESTARTABLE(_cmd, _result) do { \ 114 _result = _cmd; \ 115 } while(((int)_result == OS_ERR) && (errno == EINTR)) 116 117 #define RESTARTABLE_RETURN_INT(_cmd) do { \ 118 int _result; \ 119 RESTARTABLE(_cmd, _result); \ 120 return _result; \ 121 } while(false) 122 123 // We don't have NUMA support on Aix, but we need this for compilation. 124 inline bool os::numa_has_static_binding() { ShouldNotReachHere(); return true; } 125 inline bool os::numa_has_group_homing() { ShouldNotReachHere(); return false; } 126 127 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) { 128 size_t res; |