Lines Matching refs:fd
16 sys(sys), fd(sys->open(pathname, flags)) in Fd()
18 if (fd < 0) in Fd()
26 int fd = sys->dup(oldfd); in dup() local
27 if (fd < 0) in dup()
31 return fd; in dup()
34 Fd::Fd(int fd, const Sys* sys) : sys(sys), fd(dup(fd, sys)) {} in Fd() argument
36 Fd::Fd(int fd, std::false_type, const Sys* sys) : sys(sys), fd(fd) {} in Fd() argument
50 Fd::Fd(const Fd& other) : sys(other.sys), fd(dup(other.fd, sys)) {} in Fd()
58 fd = dup(other.fd, sys); in operator =()
63 Fd::Fd(Fd&& other) : sys(other.sys), fd(std::move(other.fd)) in Fd()
65 other.fd = -1; in Fd()
74 fd = std::move(other.fd); in operator =()
75 other.fd = -1; in operator =()
82 return fd; in operator *()
104 int r = sys->fcntl_setfl(fd, flags); in setFlags()
113 int flags = sys->fcntl_getfl(fd); in getFlags()
123 if (fd < 0) in reset()
128 int ret = sys->close(fd); in reset()
129 fd = -1; in reset()