Lines Matching refs:fd

47 status_t FdBuffer::read(int fd, int64_t timeout) {  in read()  argument
48 struct pollfd pfds = {.fd = fd, .events = POLLIN}; in read()
51 fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK); in read()
85 ::read(fd, mBuffer->writeBuffer(), mBuffer->currentToWrite())); in read()
90 VLOG("Fail to read %d: %s", fd, strerror(errno)); in read()
94 VLOG("Reached EOF of fd=%d", fd); in read()
105 status_t FdBuffer::readFully(int fd) { in readFully() argument
121 TEMP_FAILURE_RETRY(::read(fd, mBuffer->writeBuffer(), mBuffer->currentToWrite())); in readFully()
123 VLOG("Fail to read %d: %s", fd, strerror(errno)); in readFully()
137 status_t FdBuffer::readProcessedDataInStream(int fd, unique_fd toFd, unique_fd fromFd, in readProcessedDataInStream() argument
140 {.fd = fd, .events = POLLIN}, in readProcessedDataInStream()
141 {.fd = toFd.get(), .events = POLLOUT}, in readProcessedDataInStream()
142 {.fd = fromFd.get(), .events = POLLIN}, in readProcessedDataInStream()
148 fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK); in readProcessedDataInStream()
191 VLOG("fd %d is sysfs, ignore its POLLERR return value", fd); in readProcessedDataInStream()
194 VLOG("fd[%d]=%d returns error events: %s", i, fd, strerror(errno)); in readProcessedDataInStream()
200 if (cirSize != BUFFER_SIZE && pfds[0].fd != -1) { in readProcessedDataInStream()
203 amt = TEMP_FAILURE_RETRY(::read(fd, cirBuf + rpos, BUFFER_SIZE - rpos)); in readProcessedDataInStream()
205 amt = TEMP_FAILURE_RETRY(::read(fd, cirBuf + rpos, wpos - rpos)); in readProcessedDataInStream()
209 VLOG("Fail to read fd %d: %s", fd, strerror(errno)); in readProcessedDataInStream()
213 VLOG("Reached EOF of input file %d", fd); in readProcessedDataInStream()
214 pfds[0].fd = -1; // reach EOF so don't have to poll pfds[0]. in readProcessedDataInStream()
222 if (cirSize > 0 && pfds[1].fd != -1) { in readProcessedDataInStream()
241 if (cirSize == 0 && pfds[0].fd == -1 && pfds[1].fd != -1) { in readProcessedDataInStream()
244 pfds[1].fd = -1; in readProcessedDataInStream()