hotspot/src/os/linux/vm/os_linux.cpp
changeset 27400 c5955f4b7c84
parent 27164 6523fa019ffa
child 27457 adbe834be3a0
child 27683 1d5707553fff
equal deleted inserted replaced
27246:49642d463211 27400:c5955f4b7c84
  5207   } else if (::lseek64(fd, cur, SEEK_SET) == -1) {
  5207   } else if (::lseek64(fd, cur, SEEK_SET) == -1) {
  5208     return 0;
  5208     return 0;
  5209   }
  5209   }
  5210   *bytes = end - cur;
  5210   *bytes = end - cur;
  5211   return 1;
  5211   return 1;
  5212 }
       
  5213 
       
  5214 int os::socket_available(int fd, jint *pbytes) {
       
  5215   // Linux doc says EINTR not returned, unlike Solaris
       
  5216   int ret = ::ioctl(fd, FIONREAD, pbytes);
       
  5217 
       
  5218   //%% note ioctl can return 0 when successful, JVM_SocketAvailable
       
  5219   // is expected to return 0 on failure and 1 on success to the jdk.
       
  5220   return (ret < 0) ? 0 : 1;
       
  5221 }
  5212 }
  5222 
  5213 
  5223 // Map a block of memory.
  5214 // Map a block of memory.
  5224 char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
  5215 char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
  5225                         char *addr, size_t bytes, bool read_only,
  5216                         char *addr, size_t bytes, bool read_only,