Lines Matching defs:fd
1766 int fd = ::open("/proc/self/ctl", O_WRONLY);
1767 if (fd == -1)
1771 int res = ::write(fd, cmd, sizeof(long) * 2);
1772 ::close(fd);
1780 int fd = ::open("/proc/self/status", O_RDONLY);
1781 if (fd == -1)
1785 int res = os::read(fd, (void*) &status, sizeof(pstatus_t));
1786 ::close(fd);
2226 int fd = ::open(filename, O_RDONLY);
2227 if (fd == -1) {
2233 while ((bytes = ::read(fd, buf, sizeof(buf))) > 0) {
2237 ::close(fd);
2283 int fd = ::open("/proc/self/map",O_RDONLY);
2284 if (fd >= 0) {
2286 while(::read(fd, &p, sizeof(p)) > 0) {
2297 ::close(fd);
3647 size_t os::read(int fd, void *buf, unsigned int nBytes) {
3648 INTERRUPTIBLE_RETURN_INT_VM(::read(fd, buf, nBytes), os::Solaris::clear_interrupted);
3651 size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
3652 INTERRUPTIBLE_RETURN_INT(::read(fd, buf, nBytes), os::Solaris::clear_interrupted);
5308 int fd = ::open("/dev/zero", O_RDWR);
5309 if (fd < 0) {
5312 Solaris::set_dev_zero_fd(fd);
5315 fcntl(fd, F_SETFD, FD_CLOEXEC);
5611 int fd;
5615 fd = ::open64(path, oflag, mode);
5616 if (fd == -1) return -1;
5621 int ret = ::fstat64(fd, &buf64);
5627 ::close(fd);
5631 ::close(fd);
5670 if ((!enabled_extended_FILE_stdio) && fd < 256) {
5671 int newfd = ::fcntl(fd, F_DUPFD, 256);
5673 ::close(fd);
5674 fd = newfd;
5702 int flags = ::fcntl(fd, F_GETFD);
5704 ::fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
5711 return fd;
5724 jlong os::current_file_offset(int fd) {
5725 return (jlong)::lseek64(fd, (off64_t)0, SEEK_CUR);
5729 jlong os::seek_to_file_offset(int fd, jlong offset) {
5730 return (jlong)::lseek64(fd, (off64_t)offset, SEEK_SET);
5733 jlong os::lseek(int fd, jlong offset, int whence) {
5734 return (jlong) ::lseek64(fd, offset, whence);
5741 int os::ftruncate(int fd, jlong length) {
5742 return ::ftruncate64(fd, length);
5745 int os::fsync(int fd) {
5746 RESTARTABLE_RETURN_INT(::fsync(fd));
5749 int os::available(int fd, jlong *bytes) {
5754 if (::fstat64(fd, &buf64) >= 0) {
5764 INTERRUPTIBLE(::ioctl(fd, FIONREAD, &n),ioctl_return,os::Solaris::clear_interrupted);
5771 if ((cur = ::lseek64(fd, 0L, SEEK_CUR)) == -1) {
5773 } else if ((end = ::lseek64(fd, 0L, SEEK_END)) == -1) {
5775 } else if (::lseek64(fd, cur, SEEK_SET) == -1) {
5783 char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
5806 fd, file_offset);
5815 char* os::pd_remap_memory(int fd, const char* file_name, size_t file_offset,
5819 return os::map_memory(fd, file_name, file_offset, addr, bytes, read_only,
5837 int fd = ::open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666);
5838 if (fd != -1) {
5840 ::close(fd);
6032 int fd;
6037 fd = ::open(proc_name, O_RDONLY);
6038 if ( fd == -1 ) return -1;
6041 count = ::pread(fd,
6046 ::close(fd);
6714 size_t os::write(int fd, const void *buf, unsigned int nBytes) {
6715 INTERRUPTIBLE_RETURN_INT(::write(fd, buf, nBytes), os::Solaris::clear_interrupted);
6718 int os::close(int fd) {
6719 RESTARTABLE_RETURN_INT(::close(fd));
6722 int os::socket_close(int fd) {
6723 RESTARTABLE_RETURN_INT(::close(fd));
6726 int os::recv(int fd, char* buf, size_t nBytes, uint flags) {
6727 INTERRUPTIBLE_RETURN_INT((int)::recv(fd, buf, nBytes, flags), os::Solaris::clear_interrupted);
6730 int os::send(int fd, char* buf, size_t nBytes, uint flags) {
6731 INTERRUPTIBLE_RETURN_INT((int)::send(fd, buf, nBytes, flags), os::Solaris::clear_interrupted);
6734 int os::raw_send(int fd, char* buf, size_t nBytes, uint flags) {
6735 RESTARTABLE_RETURN_INT((int)::send(fd, buf, nBytes, flags));
6743 int os::timeout(int fd, long timeout) {
6749 pfd.fd = fd;
6770 int os::connect(int fd, struct sockaddr *him, socklen_t len) {
6772 INTERRUPTIBLE_NORESTART(::connect(fd, him, len), _result,\
6781 INTERRUPTIBLE(::connect(fd, him, len), _result,\
6796 int os::accept(int fd, struct sockaddr* him, socklen_t* len) {
6797 if (fd < 0) {
6800 INTERRUPTIBLE_RETURN_INT((int)::accept(fd, him, len),\
6804 int os::recvfrom(int fd, char* buf, size_t nBytes, uint flags,
6806 INTERRUPTIBLE_RETURN_INT((int)::recvfrom(fd, buf, nBytes, flags, from, fromlen),\
6810 int os::sendto(int fd, char* buf, size_t len, uint flags,
6812 INTERRUPTIBLE_RETURN_INT((int)::sendto(fd, buf, len, flags, to, tolen),\
6816 int os::socket_available(int fd, jint *pbytes) {
6817 if (fd < 0) {
6821 RESTARTABLE(::ioctl(fd, FIONREAD, pbytes), ret);
6827 int os::bind(int fd, struct sockaddr* him, socklen_t len) {
6828 INTERRUPTIBLE_RETURN_INT_NORESTART(::bind(fd, him, len),\