52 return true;
53 }
54
55
56 // On Linux, reservations are made on a page by page basis, nothing to do.
57 inline void os::pd_split_reserved_memory(char *base, size_t size,
58 size_t split, bool realloc) {
59 }
60
61
62 // Bang the shadow pages if they need to be touched to be mapped.
63 inline void os::map_stack_shadow_pages(address sp) {
64 }
65
66 inline void os::dll_unload(void *lib) {
67 ::dlclose(lib);
68 }
69
70 inline const int os::default_file_open_flags() { return 0;}
71
72 inline DIR* os::opendir(const char* dirname)
73 {
74 assert(dirname != NULL, "just checking");
75 return ::opendir(dirname);
76 }
77
78 inline int os::readdir_buf_size(const char *path)
79 {
80 return NAME_MAX + sizeof(dirent) + 1;
81 }
82
83 inline jlong os::lseek(int fd, jlong offset, int whence) {
84 return (jlong) ::lseek64(fd, offset, whence);
85 }
86
87 inline int os::fsync(int fd) {
88 return ::fsync(fd);
89 }
90
91 inline int os::ftruncate(int fd, jlong length) {
92 return ::ftruncate64(fd, length);
93 }
94
95 inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
96 {
97 assert(dirp != NULL, "just checking");
98 return ::readdir(dirp);
99 }
100
101 inline int os::closedir(DIR *dirp) {
102 assert(dirp != NULL, "argument is NULL");
103 return ::closedir(dirp);
104 }
105
106 // macros for restartable system calls
107
108 #define RESTARTABLE(_cmd, _result) do { \
109 _result = _cmd; \
110 } while(((int)_result == OS_ERR) && (errno == EINTR))
111
112 #define RESTARTABLE_RETURN_INT(_cmd) do { \
113 int _result; \
114 RESTARTABLE(_cmd, _result); \
115 return _result; \
116 } while(false)
117
118 inline bool os::numa_has_static_binding() { return true; }
119 inline bool os::numa_has_group_homing() { return false; }
120
121 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
122 size_t res;
123 RESTARTABLE( (size_t) ::read(fd, buf, (size_t) nBytes), res);
|
52 return true;
53 }
54
55
56 // On Linux, reservations are made on a page by page basis, nothing to do.
57 inline void os::pd_split_reserved_memory(char *base, size_t size,
58 size_t split, bool realloc) {
59 }
60
61
62 // Bang the shadow pages if they need to be touched to be mapped.
63 inline void os::map_stack_shadow_pages(address sp) {
64 }
65
66 inline void os::dll_unload(void *lib) {
67 ::dlclose(lib);
68 }
69
70 inline const int os::default_file_open_flags() { return 0;}
71
72 inline jlong os::lseek(int fd, jlong offset, int whence) {
73 return (jlong) ::lseek64(fd, offset, whence);
74 }
75
76 inline int os::fsync(int fd) {
77 return ::fsync(fd);
78 }
79
80 inline int os::ftruncate(int fd, jlong length) {
81 return ::ftruncate64(fd, length);
82 }
83
84 // macros for restartable system calls
85
86 #define RESTARTABLE(_cmd, _result) do { \
87 _result = _cmd; \
88 } while(((int)_result == OS_ERR) && (errno == EINTR))
89
90 #define RESTARTABLE_RETURN_INT(_cmd) do { \
91 int _result; \
92 RESTARTABLE(_cmd, _result); \
93 return _result; \
94 } while(false)
95
96 inline bool os::numa_has_static_binding() { return true; }
97 inline bool os::numa_has_group_homing() { return false; }
98
99 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
100 size_t res;
101 RESTARTABLE( (size_t) ::read(fd, buf, (size_t) nBytes), res);
|