Searched refs:fd (Results 1 - 25 of 72) sorted by relevance

123

/bionic/libc/bionic/
H A Ddaemon.c41 int fd = open("/dev/null", O_RDWR); local
43 if ( fd < 0 )
46 if ( dup2( fd, 0 ) < 0 ||
47 dup2( fd, 1 ) < 0 ||
48 dup2( fd, 2 ) < 0 )
50 close(fd);
53 close(fd);
H A Deventfd_read.cpp32 int eventfd_read(int fd, eventfd_t* value) { argument
33 return (read(fd, value, sizeof(*value)) == sizeof(*value)) ? 0 : -1;
H A Deventfd_write.cpp32 int eventfd_write(int fd, eventfd_t value) { argument
33 return (write(fd, &value, sizeof(value)) == sizeof(value)) ? 0 : -1;
H A Dfstatfs.c32 int fstatfs(int fd, struct statfs* stat) argument
34 return __fstatfs64(fd, sizeof(struct statfs), stat);
H A Dfutimens.cpp32 int futimens(int fd, const struct timespec times[2]) { argument
33 return utimensat(fd, NULL, times, 0);
H A Disatty.c34 isatty (int fd) argument
38 return tcgetattr (fd, &term) == 0;
H A Dtcsetpgrp.c30 int tcsetpgrp(int fd, pid_t _pid) argument
32 return ioctl(fd, TIOCSPGRP, &_pid);
H A Dunlockpt.c31 int unlockpt( int fd )
35 return ioctl( fd, TIOCSPTLCK, &unlock );
H A Dpread.c31 ssize_t pread(int fd, void *buf, size_t nbytes, off_t offset) argument
33 return pread64(fd, buf, nbytes, (off64_t)offset);
H A Dpwrite.c31 ssize_t pwrite(int fd, const void *buf, size_t nbytes, off_t offset) argument
33 return pwrite64(fd, buf, nbytes, (off64_t)offset);
H A Dtcgetpgrp.c30 pid_t tcgetpgrp(int fd) argument
33 return ioctl(fd, TIOCGPGRP, &_pid) ? (pid_t)-1 : _pid;
H A Dlseek64.c30 extern int __llseek(int fd, unsigned long offset_hi, unsigned long offset_lo, loff_t* result, int whence);
32 off64_t lseek64(int fd, off64_t off, int whence) argument
36 if ( __llseek(fd, (unsigned long)(off >> 32),(unsigned long)(off), &result, whence ) < 0 )
H A Dsignalfd.cpp33 extern "C" int signalfd4(int fd, kernel_sigset_t* mask, size_t sizemask, int flags);
35 int signalfd(int fd, const sigset_t* mask, int flags) { argument
37 return signalfd4(fd, &in_set, sizeof(in_set), flags);
H A Dcpuacct.c38 int fd; local
44 fd = open(buf, O_RDWR | O_CREAT, 0666);
45 if (fd == -1) {
53 fd = open(buf, O_RDWR | O_CREAT, 0666);
55 if (fd == -1)
58 n = TEMP_FAILURE_RETRY(write(fd, "0", 1));
64 if (TEMP_FAILURE_RETRY(close(fd)) == -1)
H A Dfdprintf.c34 int vfdprintf(int fd, const char * __restrict format, __va_list ap) argument
42 ret = write(fd, buf, ret);
48 int fdprintf(int fd, const char * __restrict format, ...) argument
54 ret = vfdprintf(fd, format, ap);
H A Dopenat.c36 int openat(int fd, const char *pathname, int flags, ...) argument
51 return __openat(fd, pathname, flags, mode);
54 int __openat_2(int fd, const char *pathname, int flags) argument
62 return __openat(fd, pathname, flags, 0);
H A Dfcntl.c33 int fcntl(int fd, int cmd, ...) argument
42 return __fcntl64(fd, cmd, arg);
H A Dioctl.c32 int ioctl(int fd, int request, ...) argument
41 return __ioctl(fd, request, arg);
H A Dptsname.c34 char* ptsname( int fd )
39 if ( ioctl( fd, TIOCGPTN, &pty_num ) != 0 )
/bionic/tests/
H A Deventfd_test.cpp25 int fd = eventfd(initial_value, O_NONBLOCK); local
26 ASSERT_NE(fd, -1);
29 ASSERT_EQ(0, eventfd_read(fd, &value));
33 ASSERT_EQ(-1, eventfd_read(fd, &value));
37 ASSERT_EQ(0, eventfd_write(fd, 1));
38 ASSERT_EQ(0, eventfd_write(fd, 1));
39 ASSERT_EQ(0, eventfd_write(fd, 1));
41 ASSERT_EQ(0, eventfd_read(fd, &value));
44 close(fd);
/bionic/libc/kernel/arch-arm/asm/
H A Dposix_types.h67 #define __FD_SET(fd, fdsetp) (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31)))
70 #define __FD_CLR(fd, fdsetp) (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31)))
72 #define __FD_ISSET(fd, fdsetp) ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
/bionic/libc/upstream-freebsd/lib/libc/stdio/
H A Dfileno.c50 int fd; local
53 fd = __sfileno(fp);
56 return (fd);
/bionic/libc/kernel/common/linux/
H A Dtime.h44 #define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp)
45 #define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp)
46 #define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp)
/bionic/libc/kernel/arch-mips/asm/
H A Dposix_types.h85 #define __FD_SET(fd, fdsetp) (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31)))
87 #define __FD_CLR(fd, fdsetp) (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31)))
90 #define __FD_ISSET(fd, fdsetp) ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
/bionic/libc/include/sys/
H A Deventfd.h44 extern int eventfd_read(int fd, eventfd_t* value);
45 extern int eventfd_write(int fd, eventfd_t value);

Completed in 7743 milliseconds

123