48 inline void* os::dll_lookup(void *lib, const char *name) {
49 return (void*)::GetProcAddress((HMODULE)lib, name);
50 }
51
52 // Used to improve time-sharing on some systems
53 inline void os::loop_breaker(int attempts) {}
54
55 inline bool os::obsolete_option(const JavaVMOption *option) {
56 return false;
57 }
58
59 inline bool os::uses_stack_guard_pages() {
60 return os::win32::is_nt();
61 }
62
63 inline bool os::allocate_stack_guard_pages() {
64 assert(uses_stack_guard_pages(), "sanity check");
65 return true;
66 }
67
68 inline int os::readdir_buf_size(const char *path)
69 {
70 /* As Windows doesn't use the directory entry buffer passed to
71 os::readdir() this can be as short as possible */
72
73 return 1;
74 }
75
76 // Bang the shadow pages if they need to be touched to be mapped.
77 inline void os::bang_stack_shadow_pages() {
78 // Write to each page of our new frame to force OS mapping.
79 // If we decrement stack pointer more than one page
80 // the OS may not map an intervening page into our space
81 // and may fault on a memory access to interior of our frame.
82 address sp = current_stack_pointer();
83 for (int pages = 1; pages <= StackShadowPages; pages++) {
84 *((int *)(sp - (pages * vm_page_size()))) = 0;
85 }
86 }
87
88 inline bool os::numa_has_static_binding() { return true; }
89 inline bool os::numa_has_group_homing() { return false; }
90
91 inline size_t os::read(int fd, void *buf, unsigned int nBytes) {
92 return ::read(fd, buf, nBytes);
93 }
94
95 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
|
48 inline void* os::dll_lookup(void *lib, const char *name) {
49 return (void*)::GetProcAddress((HMODULE)lib, name);
50 }
51
52 // Used to improve time-sharing on some systems
53 inline void os::loop_breaker(int attempts) {}
54
55 inline bool os::obsolete_option(const JavaVMOption *option) {
56 return false;
57 }
58
59 inline bool os::uses_stack_guard_pages() {
60 return os::win32::is_nt();
61 }
62
63 inline bool os::allocate_stack_guard_pages() {
64 assert(uses_stack_guard_pages(), "sanity check");
65 return true;
66 }
67
68 // Bang the shadow pages if they need to be touched to be mapped.
69 inline void os::bang_stack_shadow_pages() {
70 // Write to each page of our new frame to force OS mapping.
71 // If we decrement stack pointer more than one page
72 // the OS may not map an intervening page into our space
73 // and may fault on a memory access to interior of our frame.
74 address sp = current_stack_pointer();
75 for (int pages = 1; pages <= StackShadowPages; pages++) {
76 *((int *)(sp - (pages * vm_page_size()))) = 0;
77 }
78 }
79
80 inline bool os::numa_has_static_binding() { return true; }
81 inline bool os::numa_has_group_homing() { return false; }
82
83 inline size_t os::read(int fd, void *buf, unsigned int nBytes) {
84 return ::read(fd, buf, nBytes);
85 }
86
87 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
|