15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef OS_WINDOWS_VM_OS_WINDOWS_INLINE_HPP
26 #define OS_WINDOWS_VM_OS_WINDOWS_INLINE_HPP
27
28 #include "runtime/os.hpp"
29 #include "runtime/thread.hpp"
30
31 inline const char* os::dll_file_extension() { return ".dll"; }
32
33 inline const int os::default_file_open_flags() { return O_BINARY | O_NOINHERIT;}
34
35 // File names are case-insensitive on windows only
36 inline int os::file_name_strncmp(const char* s, const char* t, size_t num) {
37 return _strnicmp(s, t, num);
38 }
39
40 inline void os::dll_unload(void *lib) {
41 ::FreeLibrary((HMODULE)lib);
42 }
43
44 inline void* os::dll_lookup(void *lib, const char *name) {
45 return (void*)::GetProcAddress((HMODULE)lib, name);
46 }
47
48 inline bool os::uses_stack_guard_pages() {
49 return true;
50 }
51
52 inline bool os::must_commit_stack_guard_pages() {
53 return true;
54 }
|
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef OS_WINDOWS_VM_OS_WINDOWS_INLINE_HPP
26 #define OS_WINDOWS_VM_OS_WINDOWS_INLINE_HPP
27
28 #include "runtime/os.hpp"
29 #include "runtime/thread.hpp"
30
31 inline const char* os::dll_file_extension() { return ".dll"; }
32
33 inline const int os::default_file_open_flags() { return O_BINARY | O_NOINHERIT;}
34
35 // Use threadsafe version of strtok
36 inline char* os::strtok(char *str, const char *delim, char **saveptr) {
37 return strtok_s(str, delim, saveptr);
38 }
39
40 // File names are case-insensitive on windows only
41 inline int os::file_name_strncmp(const char* s, const char* t, size_t num) {
42 return _strnicmp(s, t, num);
43 }
44
45 inline void os::dll_unload(void *lib) {
46 ::FreeLibrary((HMODULE)lib);
47 }
48
49 inline void* os::dll_lookup(void *lib, const char *name) {
50 return (void*)::GetProcAddress((HMODULE)lib, name);
51 }
52
53 inline bool os::uses_stack_guard_pages() {
54 return true;
55 }
56
57 inline bool os::must_commit_stack_guard_pages() {
58 return true;
59 }
|