Lines Matching refs:fd
30 int fd, err; in os_process_pc() local
33 fd = open(proc_stat, O_RDONLY, 0); in os_process_pc()
34 if (fd < 0) { in os_process_pc()
39 CATCH_EINTR(err = read(fd, buf, sizeof(buf))); in os_process_pc()
45 os_close_file(fd); in os_process_pc()
53 close(fd); in os_process_pc()
62 int parent = FAILURE_PID, n, fd; in os_process_parent() local
68 fd = open(stat, O_RDONLY, 0); in os_process_parent()
69 if (fd < 0) { in os_process_parent()
75 CATCH_EINTR(n = read(fd, data, sizeof(data))); in os_process_parent()
76 close(fd); in os_process_parent()
132 int os_map_memory(void *virt, int fd, unsigned long long off, unsigned long len, in os_map_memory() argument
142 fd, off); in os_map_memory()
186 int fd, ok = 0; in can_drop_memory() local
189 fd = create_mem_file(UM_KERN_PAGE_SIZE); in can_drop_memory()
190 if (fd < 0) { in can_drop_memory()
192 "err = %d\n", -fd); in can_drop_memory()
197 MAP_SHARED, fd, 0); in can_drop_memory()
215 close(fd); in can_drop_memory()