comparison src/share/vm/runtime/hpi.hpp @ 691:956304450e80

6819213: revive sun.boot.library.path Summary: Support multiplex and mutable sun.boot.library.path Reviewed-by: acorn, dcubed, xlu
author phh
date Wed, 01 Apr 2009 16:38:01 -0400
parents 2a1a77d3458f
children bd02caa94611
comparison
equal deleted inserted replaced
690:d142f1feeed5 691:956304450e80
88 static inline struct hostent* get_host_by_addr(const char* name, int len, int type); 88 static inline struct hostent* get_host_by_addr(const char* name, int len, int type);
89 static inline struct hostent* get_host_by_name(char* name); 89 static inline struct hostent* get_host_by_name(char* name);
90 static inline struct protoent* get_proto_by_name(char* name); 90 static inline struct protoent* get_proto_by_name(char* name);
91 91
92 // HPI_LibraryInterface 92 // HPI_LibraryInterface
93 static inline void dll_build_name(char *buf, int buf_len, char* path, 93 static inline void dll_build_name(char *buf, int buf_len, const char* path,
94 const char *name); 94 const char *name);
95 static inline void* dll_load(const char *name, char *ebuf, int ebuflen); 95 static inline void* dll_load(const char *name, char *ebuf, int ebuflen);
96 static inline void dll_unload(void *lib); 96 static inline void dll_unload(void *lib);
97 static inline void* dll_lookup(void *lib, const char *name); 97 static inline void* dll_lookup(void *lib, const char *name);
98 98
135 tty->print_cr(ret_fmt, result); \ 135 tty->print_cr(ret_fmt, result); \
136 } \ 136 } \
137 return result; \ 137 return result; \
138 } 138 }
139 139
140 140 #define VM_HPIDECL_VOID(name, names, func, arg_type, arg_print, arg) \
141 inline void hpi::name arg_type { \
142 if (TraceHPI) { \
143 tty->print("hpi::" names "("); \
144 tty->print arg_print; \
145 tty->print(") = "); \
146 } \
147 func arg; \
148 }
141 149
142 #define HPIDECL_VOID(name, names, intf, func, arg_type, arg_print, arg) \ 150 #define HPIDECL_VOID(name, names, intf, func, arg_type, arg_print, arg) \
143 inline void hpi::name arg_type { \ 151 inline void hpi::name arg_type { \
144 if (TraceHPI) { \ 152 if (TraceHPI) { \
145 tty->print("hpi::" names "("); \ 153 tty->print("hpi::" names "("); \
195 (int fd, jlong *size), 203 (int fd, jlong *size),
196 ("fd = %d, size = %p", fd, size), 204 ("fd = %d, size = %p", fd, size),
197 (fd, size)); 205 (fd, size));
198 206
199 // HPI_LibraryInterface 207 // HPI_LibraryInterface
200 HPIDECL_VOID(dll_build_name, "dll_build_name", _library, BuildLibName, 208 VM_HPIDECL_VOID(dll_build_name, "dll_build_name", os::dll_build_name,
201 (char *buf, int buf_len, char *path, const char *name), 209 (char *buf, int buf_len, const char *path, const char *name),
202 ("buf = %p, buflen = %d, path = %s, name = %s", 210 ("buf = %p, buflen = %d, path = %s, name = %s",
203 buf, buf_len, path, name), 211 buf, buf_len, path, name),
204 (buf, buf_len, path, name)); 212 (buf, buf_len, path, name));
205 213
206 VM_HPIDECL(dll_load, "dll_load", os::dll_load, 214 VM_HPIDECL(dll_load, "dll_load", os::dll_load,
207 void *, "(void *)%p", 215 void *, "(void *)%p",
208 (const char *name, char *ebuf, int ebuflen), 216 (const char *name, char *ebuf, int ebuflen),
209 ("name = %s, ebuf = %p, ebuflen = %d", name, ebuf, ebuflen), 217 ("name = %s, ebuf = %p, ebuflen = %d", name, ebuf, ebuflen),