Lines Matching refs:size
77 int readStringFromFile(const char *filename, char *const start, size_t size, bool must_exist=true) in readStringFromFile() argument
79 if (NULL == start || size == 0) in readStringFromFile()
99 --size; // reserve space for trailing '\0' in readStringFromFile()
101 while (size > 0 && !error && !eof && attempts < kMaxAttempts) in readStringFromFile()
105 s = read(fd, end, size); in readStringFromFile()
122 size -= s; in readStringFromFile()
161 size_t size = len; in writeStringToFile() local
165 while (size > 0 && !error && attempts < kMaxAttempts) in writeStringToFile()
167 ssize_t s = write(fd, start, size); in writeStringToFile()
180 size -= s; in writeStringToFile()
192 if (size > 0) in writeStringToFile()
195 filename, size, len); in writeStringToFile()
197 return len - size; in writeStringToFile()
235 int kernelVersion(char *str, size_t size) in kernelVersion() argument
237 return readStringFromFile(kKernelVersion, str, size); in kernelVersion()
285 int schedFeatures(char *str, size_t size) in schedFeatures() argument
287 return readStringFromFile(kSchedFeatures, str, size); in schedFeatures()
447 size_t size = sizeof(pid); in writePidAndWaitForReply() local
451 while (size > 0 && !error && attempts < kMaxAttempts) in writePidAndWaitForReply()
453 ssize_t s = write(writefd, start, size); in writePidAndWaitForReply()
466 size -= s; in writePidAndWaitForReply()
471 if (error || 0 != size) in writePidAndWaitForReply()
478 size = sizeof(dummy); in writePidAndWaitForReply()
482 while (size > 0 && !error && !eof && attempts < kMaxAttempts) in writePidAndWaitForReply()
486 s = read(readfd, &dummy, size); in writePidAndWaitForReply()
502 size -= s; in writePidAndWaitForReply()
506 if (error || 0 != size) in writePidAndWaitForReply()
525 size_t size; in waitForChildrenAndSignal() local
535 size = sizeof(pid); in waitForChildrenAndSignal()
537 while (size > 0 && !error && !eof && attempts < kMaxAttempts) in waitForChildrenAndSignal()
541 s = read(readfd, end, size); in waitForChildrenAndSignal()
558 size -= s; in waitForChildrenAndSignal()
563 if (error || 0 != size) in waitForChildrenAndSignal()
575 size = sizeof(dummy); in waitForChildrenAndSignal()
577 while (size > 0 && !error && attempts < kMaxAttempts) in waitForChildrenAndSignal()
579 ssize_t s = write(writefd, &dummy, size); in waitForChildrenAndSignal()
591 size -= s; in waitForChildrenAndSignal()
596 if (error || 0 != size) in waitForChildrenAndSignal()