48 49 inline bool os::allocate_stack_guard_pages() { 50 assert(uses_stack_guard_pages(), "sanity check"); 51 int r = thr_main() ; 52 guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ; 53 return r; 54 } 55 56 57 // On Solaris, reservations are made on a page by page basis, nothing to do. 58 inline void os::pd_split_reserved_memory(char *base, size_t size, 59 size_t split, bool realloc) { 60 } 61 62 63 // Bang the shadow pages if they need to be touched to be mapped. 64 inline void os::bang_stack_shadow_pages() { 65 } 66 inline void os::dll_unload(void *lib) { ::dlclose(lib); } 67 68 inline DIR* os::opendir(const char* dirname) { 69 assert(dirname != NULL, "just checking"); 70 return ::opendir(dirname); 71 } 72 73 inline int os::readdir_buf_size(const char *path) { 74 int size = pathconf(path, _PC_NAME_MAX); 75 return (size < 0 ? MAXPATHLEN : size) + sizeof(dirent) + 1; 76 } 77 78 inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) { 79 assert(dirp != NULL, "just checking"); 80 #if defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64 81 dirent* p; 82 int status; 83 84 if((status = ::readdir_r(dirp, dbuf, &p)) != 0) { 85 errno = status; 86 return NULL; 87 } else | 48 49 inline bool os::allocate_stack_guard_pages() { 50 assert(uses_stack_guard_pages(), "sanity check"); 51 int r = thr_main() ; 52 guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ; 53 return r; 54 } 55 56 57 // On Solaris, reservations are made on a page by page basis, nothing to do. 58 inline void os::pd_split_reserved_memory(char *base, size_t size, 59 size_t split, bool realloc) { 60 } 61 62 63 // Bang the shadow pages if they need to be touched to be mapped. 64 inline void os::bang_stack_shadow_pages() { 65 } 66 inline void os::dll_unload(void *lib) { ::dlclose(lib); } 67 68 inline const int os::default_file_open_flags() { return 0;} 69 70 inline DIR* os::opendir(const char* dirname) { 71 assert(dirname != NULL, "just checking"); 72 return ::opendir(dirname); 73 } 74 75 inline int os::readdir_buf_size(const char *path) { 76 int size = pathconf(path, _PC_NAME_MAX); 77 return (size < 0 ? MAXPATHLEN : size) + sizeof(dirent) + 1; 78 } 79 80 inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) { 81 assert(dirp != NULL, "just checking"); 82 #if defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64 83 dirent* p; 84 int status; 85 86 if((status = ::readdir_r(dirp, dbuf, &p)) != 0) { 87 errno = status; 88 return NULL; 89 } else |