Debian Codegraph @

libc-top-half/musl/src/unistd/close.c

raw
1 #include <unistd.h>
2 #include <errno.h>
3 #include "aio_impl.h"
4 #include "syscall.h"
5
6 static int dummy(int fd)
7 {
8 return fd;
9 }
10
11 weak_alias(dummy, __aio_close);
12
13 int close(int fd)
14 {
15 fd = __aio_close(fd);
16 int r = __syscall_cp(SYS_close, fd);
17 if (r == -EINTR) r = 0;
18 return __syscall_ret(r);
19 }