Lines Matching refs:fd
31 int fd, err; in os_process_pc() local
34 fd = open(proc_stat, O_RDONLY, 0); in os_process_pc()
35 if (fd < 0) { in os_process_pc()
40 CATCH_EINTR(err = read(fd, buf, sizeof(buf))); in os_process_pc()
46 os_close_file(fd); in os_process_pc()
54 close(fd); in os_process_pc()
63 int parent = FAILURE_PID, n, fd; in os_process_parent() local
69 fd = open(stat, O_RDONLY, 0); in os_process_parent()
70 if (fd < 0) { in os_process_parent()
76 CATCH_EINTR(n = read(fd, data, sizeof(data))); in os_process_parent()
77 close(fd); in os_process_parent()
138 int os_map_memory(void *virt, int fd, unsigned long long off, unsigned long len, in os_map_memory() argument
148 fd, off); in os_map_memory()
192 int fd, ok = 0; in can_drop_memory() local
195 fd = create_mem_file(UM_KERN_PAGE_SIZE); in can_drop_memory()
196 if (fd < 0) { in can_drop_memory()
198 "err = %d\n", -fd); in can_drop_memory()
203 MAP_SHARED, fd, 0); in can_drop_memory()
221 close(fd); in can_drop_memory()