Lines Matching refs:fd
37 static bool ashmem_validate_stat(int fd, struct stat* buf) { in ashmem_validate_stat() argument
38 int result = fstat(fd, buf); in ashmem_validate_stat()
55 int ashmem_valid(int fd) { in ashmem_valid() argument
57 return ashmem_validate_stat(fd, &buf); in ashmem_valid()
63 int fd = mkstemp(pattern); in ashmem_create_region() local
64 if (fd == -1) return -1; in ashmem_create_region()
68 if (TEMP_FAILURE_RETRY(ftruncate(fd, size)) == -1) { in ashmem_create_region()
69 close(fd); in ashmem_create_region()
73 return fd; in ashmem_create_region()
88 int ashmem_get_size_region(int fd) in ashmem_get_size_region() argument
91 if (!ashmem_validate_stat(fd, &buf)) { in ashmem_get_size_region()