/bionic/libc/upstream-openbsd/lib/libc/gen/ |
H A D | daemon.c | 39 int fd; local 56 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { 57 (void)dup2(fd, STDIN_FILENO); 58 (void)dup2(fd, STDOUT_FILENO); 59 (void)dup2(fd, STDERR_FILENO); 60 if (fd > 2) 61 (void)close(fd);
|
/bionic/libc/kernel/uapi/linux/ |
H A D | kcm.h | 22 int fd; member in struct:kcm_attach 26 int fd; member in struct:kcm_unattach 29 int fd; member in struct:kcm_clone
|
/bionic/libc/versioner-dependencies/common/kernel_uapi/linux/ |
H A D | kcm.h | 22 int fd; member in struct:kcm_attach 26 int fd; member in struct:kcm_unattach 29 int fd; member in struct:kcm_clone
|
/bionic/tools/versioner/dependencies/common/kernel_uapi/linux/ |
H A D | kcm.h | 22 int fd; member in struct:kcm_attach 26 int fd; member in struct:kcm_unattach 29 int fd; member in struct:kcm_clone
|
/bionic/libc/bionic/ |
H A D | close.cpp | 34 int close(int fd) { argument 35 int rc = ___close(fd); 37 // POSIX says that if close returns with EINTR, the fd must not be closed.
|
H A D | eventfd_read.cpp | 32 int eventfd_read(int fd, eventfd_t* value) { argument 33 return (read(fd, value, sizeof(*value)) == sizeof(*value)) ? 0 : -1;
|
H A D | eventfd_write.cpp | 32 int eventfd_write(int fd, eventfd_t value) { argument 33 return (write(fd, &value, sizeof(value)) == sizeof(value)) ? 0 : -1;
|
H A D | futimens.cpp | 32 int futimens(int fd, const struct timespec times[2]) { argument 33 return utimensat(fd, NULL, times, 0);
|
H A D | isatty.c | 34 isatty (int fd) argument 38 return tcgetattr (fd, &term) == 0;
|
H A D | posix_fallocate.cpp | 33 int posix_fallocate(int fd, off_t offset, off_t length) { argument 35 return (fallocate(fd, 0, offset, length) == 0) ? 0 : errno; 38 int posix_fallocate64(int fd, off64_t offset, off64_t length) { argument 40 return (fallocate64(fd, 0, offset, length) == 0) ? 0 : errno;
|
H A D | sys_signalfd.cpp | 35 int signalfd(int fd, const sigset_t* mask, int flags) { argument 38 return signalfd64(fd, &set.sigset64, flags); 41 int signalfd64(int fd, const sigset64_t* mask, int flags) { argument 42 return __signalfd4(fd, mask, sizeof(*mask), flags);
|
H A D | termios.cpp | 38 pid_t tcgetpgrp(int fd) { argument 40 return (ioctl(fd, TIOCGPGRP, &pid) == -1) ? -1 : pid; 44 int tcsetpgrp(int fd, pid_t pid) { argument 45 return ioctl(fd, TIOCSPGRP, &pid);
|
H A D | posix_fadvise.cpp | 37 int posix_fadvise(int fd, off_t offset, off_t length, int advice) { argument 38 return posix_fadvise64(fd, offset, length, advice); 42 int posix_fadvise64(int fd, off64_t offset, off64_t length, int advice) { argument 44 return (__arm_fadvise64_64(fd, advice, offset, length) == 0) ? 0 : errno; 47 int posix_fadvise64(int fd, off64_t offset, off64_t length, int advice) { argument 49 return (__fadvise64(fd, offset, length, advice) == 0) ? 0 : errno;
|
H A D | sync_file_range.cpp | 34 int sync_file_range(int fd, off64_t offset, off64_t length, unsigned int flags) { argument 36 return __sync_file_range2(fd, flags, offset, length); 38 return __sync_file_range(fd, offset, length, flags);
|
H A D | tmpfile.cpp | 50 int fd; local 53 fd = mkstemp(path); 54 if (fd == -1) { 66 int rc = fstat(fd, &sb); 69 close(fd); 75 FILE* fp = fdopen(fd, "w+"); 82 close(fd);
|
H A D | sys_epoll.cpp | 44 int epoll_pwait(int fd, epoll_event* events, int max_events, int timeout, const sigset_t* ss) { argument 52 return epoll_pwait64(fd, events, max_events, timeout, ss_ptr); 55 int epoll_pwait64(int fd, epoll_event* events, int max_events, int timeout, const sigset64_t* ss) { argument 56 return __epoll_pwait(fd, events, max_events, timeout, ss, sizeof(*ss)); 59 int epoll_wait(int fd, struct epoll_event* events, int max_events, int timeout) { argument 60 return epoll_pwait64(fd, events, max_events, timeout, nullptr);
|
H A D | sys_time.cpp | 37 static int futimesat(int fd, const char* path, const timeval tv[2], int flags) { argument 43 return utimensat(fd, path, tv ? ts : nullptr, flags); 54 int futimesat(int fd, const char* path, const timeval tv[2]) { argument 55 return futimesat(fd, path, tv, 0); 58 int futimes(int fd, const timeval tv[2]) { argument 64 return futimens(fd, tv ? ts : nullptr);
|
H A D | fchmod.cpp | 40 int fchmod(int fd, mode_t mode) { argument 42 int result = ___fchmod(fd, mode); 47 // fd could be an O_PATH file descriptor, and the kernel 49 // Use /proc/self/fd instead to emulate this support. 55 int fd_flag = fcntl(fd, F_GETFL); 62 result = chmod(FdPath(fd).c_str(), mode);
|
/bionic/libc/include/sys/ |
H A D | select.h | 49 #define __FDELT(fd) ((fd) / NFDBITS) 50 #define __FDMASK(fd) (1UL << ((fd) % NFDBITS)) 66 #define __FD_CLR(fd, set) (__FDS_BITS(fd_set*,set)[__FDELT(fd)] &= ~__FDMASK(fd)) 67 #define __FD_SET(fd, set) (__FDS_BITS(fd_set*,set)[__FDELT(fd)] |= __FDMASK(fd)) [all...] |
/bionic/tests/ |
H A D | eventfd_test.cpp | 39 int fd = eventfd(initial_value, O_NONBLOCK); local 40 ASSERT_NE(fd, -1); 43 ASSERT_EQ(0, eventfd_read(fd, &value)); 47 ASSERT_EQ(-1, eventfd_read(fd, &value)); 51 ASSERT_EQ(0, eventfd_write(fd, 1)); 52 ASSERT_EQ(0, eventfd_write(fd, 1)); 53 ASSERT_EQ(0, eventfd_write(fd, 1)); 55 ASSERT_EQ(0, eventfd_read(fd, &value)); 58 close(fd);
|
H A D | fcntl_test.cpp | 36 int fd = open("/proc/version", O_RDONLY); local 37 ASSERT_TRUE(fd != -1); 39 int flags = fcntl(fd, F_GETFD); 43 int rc = fcntl(fd, F_SETFD, FD_CLOEXEC); 46 flags = fcntl(fd, F_GETFD); 50 close(fd); 54 int fd; local 56 fd = open("/proc/version", O_RDONLY); 57 ASSERT_TRUE(fd != -1); 58 close(fd); 66 int fd; local 153 int fd = open64("/proc/version", O_RDONLY); local 310 int fd = open(dir.dirname, O_TMPFILE | O_RDWR, perms); local [all...] |
H A D | sys_sendfile_test.cpp | 28 ASSERT_EQ(5, TEMP_FAILURE_RETRY(write(src_file.fd, "hello", 5))); 34 ssize_t rc = sendfile(dst_file.fd, src_file.fd, &offset, count); 38 ASSERT_EQ(0, lseek(dst_file.fd, 0, SEEK_SET)); 41 ASSERT_EQ(2, TEMP_FAILURE_RETRY(read(dst_file.fd, &buf, 2))); 47 ASSERT_EQ(5, TEMP_FAILURE_RETRY(write(src_file.fd, "hello", 5))); 53 ssize_t rc = sendfile64(dst_file.fd, src_file.fd, &offset, count); 57 ASSERT_EQ(0, lseek(dst_file.fd, 0, SEEK_SET)); 60 ASSERT_EQ(2, TEMP_FAILURE_RETRY(read(dst_file.fd, [all...] |
/bionic/tools/versioner/current/sys/ |
H A D | select.h | 49 #define __FDELT(fd) ((fd) / NFDBITS) 50 #define __FDMASK(fd) (1UL << ((fd) % NFDBITS)) 66 #define __FD_CLR(fd, set) (__FDS_BITS(fd_set*,set)[__FDELT(fd)] &= ~__FDMASK(fd)) 67 #define __FD_SET(fd, set) (__FDS_BITS(fd_set*,set)[__FDELT(fd)] |= __FDMASK(fd)) [all...] |
/bionic/libc/private/ |
H A D | FdPath.h | 21 explicit FdPath(int fd) { argument 22 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd);
|
/bionic/libc/tzcode/ |
H A D | bionic.cpp | 111 int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY | O_CLOEXEC)); local 112 if (fd == -1) { 117 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, &header, sizeof(header))); 121 close(fd); 127 close(fd); 131 if (TEMP_FAILURE_RETRY(lseek(fd, ntohl(header.index_offset), SEEK_SET)) == -1) { 133 close(fd); 140 close(fd); 146 close(fd); 154 close(fd); 200 int fd; local [all...] |