< prev index next >

src/hotspot/os/posix/os_posix.cpp

Print this page

 736     l_path = "<not available>";
 737   }
 738 
 739   char ebuf[1024];
 740   bool res = os::pd_dll_unload(lib, ebuf, sizeof(ebuf));
 741 
 742   if (res) {
 743     Events::log_dll_message(nullptr, "Unloaded shared library \"%s\" [" INTPTR_FORMAT "]",
 744                             l_path, p2i(lib));
 745     log_info(os)("Unloaded shared library \"%s\" [" INTPTR_FORMAT "]", l_path, p2i(lib));
 746   } else {
 747     Events::log_dll_message(nullptr, "Attempt to unload shared library \"%s\" [" INTPTR_FORMAT "] failed, %s",
 748                             l_path, p2i(lib), ebuf);
 749     log_info(os)("Attempt to unload shared library \"%s\" [" INTPTR_FORMAT "] failed, %s",
 750                   l_path, p2i(lib), ebuf);
 751   }
 752   LINUX_ONLY(os::free(l_pathdup));
 753 }
 754 
 755 jlong os::lseek(int fd, jlong offset, int whence) {
 756   return (jlong) AIX_ONLY(::lseek64) NOT_AIX(::lseek)(fd, offset, whence);
 757 }
 758 
 759 int os::ftruncate(int fd, jlong length) {
 760    return AIX_ONLY(::ftruncate64) NOT_AIX(::ftruncate)(fd, length);
 761 }
 762 
 763 const char* os::get_current_directory(char *buf, size_t buflen) {
 764   return getcwd(buf, buflen);
 765 }
 766 
 767 FILE* os::fdopen(int fd, const char* mode) {
 768   return ::fdopen(fd, mode);
 769 }
 770 
 771 ssize_t os::pd_write(int fd, const void *buf, size_t nBytes) {
 772   ssize_t res;
 773   RESTARTABLE(::write(fd, buf, nBytes), res);
 774   return res;
 775 }
 776 
 777 ssize_t os::read_at(int fd, void *buf, unsigned int nBytes, jlong offset) {
 778   return ::pread(fd, buf, nBytes, offset);
 779 }
 780 

 736     l_path = "<not available>";
 737   }
 738 
 739   char ebuf[1024];
 740   bool res = os::pd_dll_unload(lib, ebuf, sizeof(ebuf));
 741 
 742   if (res) {
 743     Events::log_dll_message(nullptr, "Unloaded shared library \"%s\" [" INTPTR_FORMAT "]",
 744                             l_path, p2i(lib));
 745     log_info(os)("Unloaded shared library \"%s\" [" INTPTR_FORMAT "]", l_path, p2i(lib));
 746   } else {
 747     Events::log_dll_message(nullptr, "Attempt to unload shared library \"%s\" [" INTPTR_FORMAT "] failed, %s",
 748                             l_path, p2i(lib), ebuf);
 749     log_info(os)("Attempt to unload shared library \"%s\" [" INTPTR_FORMAT "] failed, %s",
 750                   l_path, p2i(lib), ebuf);
 751   }
 752   LINUX_ONLY(os::free(l_pathdup));
 753 }
 754 
 755 jlong os::lseek(int fd, jlong offset, int whence) {
 756   return (jlong) ::lseek(fd, offset, whence);
 757 }
 758 
 759 int os::ftruncate(int fd, jlong length) {
 760    return ::ftruncate(fd, length);
 761 }
 762 
 763 const char* os::get_current_directory(char *buf, size_t buflen) {
 764   return getcwd(buf, buflen);
 765 }
 766 
 767 FILE* os::fdopen(int fd, const char* mode) {
 768   return ::fdopen(fd, mode);
 769 }
 770 
 771 ssize_t os::pd_write(int fd, const void *buf, size_t nBytes) {
 772   ssize_t res;
 773   RESTARTABLE(::write(fd, buf, nBytes), res);
 774   return res;
 775 }
 776 
 777 ssize_t os::read_at(int fd, void *buf, unsigned int nBytes, jlong offset) {
 778   return ::pread(fd, buf, nBytes, offset);
 779 }
 780 
< prev index next >