Home
last modified time | relevance | path

Searched refs:fd_ (Results 1 – 25 of 92) sorted by relevance

1234

/external/drm_hwcomposer/
Dautofd.h27 UniqueFd(int fd) : fd_(fd) { in UniqueFd()
30 fd_ = rhs.fd_; in UniqueFd()
31 rhs.fd_ = -1; in UniqueFd()
40 if (fd_ >= 0) in ~UniqueFd()
41 close(fd_); in ~UniqueFd()
45 int old_fd = fd_; in Release()
46 fd_ = -1; in Release()
51 if (fd_ >= 0) in Set()
52 close(fd_); in Set()
53 fd_ = fd; in Set()
[all …]
/external/bcc/src/cc/includes/
Dfile_desc.h27 explicit FileDesc(int fd = -1) : fd_(fd) {} in fd_() function
28 FileDesc(FileDesc &&that) : fd_(-1) { *this = std::move(that); } in FileDesc()
32 if (fd_ >= 0) in ~FileDesc()
33 ::close(fd_); in ~FileDesc()
37 if (fd_ >= 0)
38 ::close(fd_);
39 fd_ = fd;
43 if (fd_ >= 0)
44 ::close(fd_);
45 fd_ = that.fd_;
[all …]
/external/bcc/src/cc/
Dfile_desc.h27 explicit FileDesc(int fd = -1) : fd_(fd) {} in fd_() function
28 FileDesc(FileDesc &&that) : fd_(-1) { *this = std::move(that); } in FileDesc()
32 if (fd_ >= 0) in ~FileDesc()
33 ::close(fd_); in ~FileDesc()
37 if (fd_ >= 0)
38 ::close(fd_);
39 fd_ = fd;
43 if (fd_ >= 0)
44 ::close(fd_);
45 fd_ = that.fd_;
[all …]
/external/google-breakpad/src/common/linux/tests/
Dauto_testfile.h61 if (fd_ >= 0) in AutoTestFile()
67 if (fd_ >= 0) in AutoTestFile()
73 if (fd_ >= 0) { in ~AutoTestFile()
74 close(fd_); in ~AutoTestFile()
75 fd_ = -1; in ~AutoTestFile()
82 return fd_ >= 0; in IsOk()
88 return fd_; in GetFd()
93 fd_ = -1; in Init()
101 fd_ = mkstemp(path_templ); in Init()
102 if (fd_ < 0) in Init()
[all …]
/external/strace/tests-m32/
Dtest_nlattr.h60 #define TEST_NLATTR_EX_(fd_, nlh0_, hdrlen_, \ argument
80 sprintrc(sendto((fd_), nlh, msg_len, \
83 printf("sendto(%d, {", (fd_)); \
97 #define TEST_NLATTR_(fd_, nlh0_, hdrlen_, \ argument
101 TEST_NLATTR_EX_((fd_), (nlh0_), (hdrlen_), \
107 #define TEST_NLATTR(fd_, nlh0_, hdrlen_, \ argument
111 TEST_NLATTR_((fd_), (nlh0_), (hdrlen_), \
116 #define TEST_NLATTR_OBJECT_EX_(fd_, nlh0_, hdrlen_, \ argument
126 TEST_NLATTR_((fd_), (nlh0_), (hdrlen_), \
132 TEST_NLATTR_((fd_), (nlh0_), (hdrlen_), \
[all …]
Dtest_netlink.h10 #define TEST_NETLINK_(fd_, nlh0_, \ argument
28 sprintrc(sendto((fd_), TEST_NETLINK_nlh, \
34 (fd_), msg_len, (type_str_), (flags_str_)); \
42 #define TEST_NETLINK(fd_, nlh0_, type_, flags_, \ argument
44 TEST_NETLINK_((fd_), (nlh0_), \
49 #define TEST_NETLINK_OBJECT_EX_(fd_, nlh0_, \ argument
61 TEST_NETLINK_((fd_), (nlh0_), \
67 TEST_NETLINK_((fd_), (nlh0_), \
75 TEST_NETLINK_((fd_), (nlh0_), \
83 #define TEST_NETLINK_OBJECT_EX(fd_, nlh0_, \ argument
[all …]
Dnlattr_ifla_linkinfo.c55 #define TEST_UNKNOWN_TUNNELS(fd_, nlh0_, objtype_, objtype_str_, \ argument
91 TEST_NLATTR_EX_((fd_), \
110 #define TEST_LINKINFO_(fd_, nlh0_, nla_type_, nla_type_str_, tuntype_, \ argument
130 TEST_NLATTR_EX_((fd_), \
148 TEST_NLATTR_EX_((fd_), (nlh0_) - NLA_HDRLEN, \
164 TEST_NLATTR_EX_((fd_), (nlh0_) - NLA_HDRLEN, \
180 #define TEST_LINKINFO(fd_, nlh0_, nla_type_, tuntype_, \ argument
182 TEST_LINKINFO_((fd_), (nlh0_), nla_type_, #nla_type_, (tuntype_), \
186 #define TEST_NESTED_LINKINFO(fd_, nlh0_, \ argument
237 TEST_NLATTR_EX_((fd_), (nlh0_) - hdrlen - tunhdrlen, \
/external/strace/tests-mx32/
Dtest_nlattr.h60 #define TEST_NLATTR_EX_(fd_, nlh0_, hdrlen_, \ argument
80 sprintrc(sendto((fd_), nlh, msg_len, \
83 printf("sendto(%d, {", (fd_)); \
97 #define TEST_NLATTR_(fd_, nlh0_, hdrlen_, \ argument
101 TEST_NLATTR_EX_((fd_), (nlh0_), (hdrlen_), \
107 #define TEST_NLATTR(fd_, nlh0_, hdrlen_, \ argument
111 TEST_NLATTR_((fd_), (nlh0_), (hdrlen_), \
116 #define TEST_NLATTR_OBJECT_EX_(fd_, nlh0_, hdrlen_, \ argument
126 TEST_NLATTR_((fd_), (nlh0_), (hdrlen_), \
132 TEST_NLATTR_((fd_), (nlh0_), (hdrlen_), \
[all …]
Dtest_netlink.h10 #define TEST_NETLINK_(fd_, nlh0_, \ argument
28 sprintrc(sendto((fd_), TEST_NETLINK_nlh, \
34 (fd_), msg_len, (type_str_), (flags_str_)); \
42 #define TEST_NETLINK(fd_, nlh0_, type_, flags_, \ argument
44 TEST_NETLINK_((fd_), (nlh0_), \
49 #define TEST_NETLINK_OBJECT_EX_(fd_, nlh0_, \ argument
61 TEST_NETLINK_((fd_), (nlh0_), \
67 TEST_NETLINK_((fd_), (nlh0_), \
75 TEST_NETLINK_((fd_), (nlh0_), \
83 #define TEST_NETLINK_OBJECT_EX(fd_, nlh0_, \ argument
[all …]
/external/strace/tests/
Dtest_nlattr.h60 #define TEST_NLATTR_EX_(fd_, nlh0_, hdrlen_, \ argument
80 sprintrc(sendto((fd_), nlh, msg_len, \
83 printf("sendto(%d, {", (fd_)); \
97 #define TEST_NLATTR_(fd_, nlh0_, hdrlen_, \ argument
101 TEST_NLATTR_EX_((fd_), (nlh0_), (hdrlen_), \
107 #define TEST_NLATTR(fd_, nlh0_, hdrlen_, \ argument
111 TEST_NLATTR_((fd_), (nlh0_), (hdrlen_), \
116 #define TEST_NLATTR_OBJECT_EX_(fd_, nlh0_, hdrlen_, \ argument
126 TEST_NLATTR_((fd_), (nlh0_), (hdrlen_), \
132 TEST_NLATTR_((fd_), (nlh0_), (hdrlen_), \
[all …]
Dtest_netlink.h10 #define TEST_NETLINK_(fd_, nlh0_, \ argument
28 sprintrc(sendto((fd_), TEST_NETLINK_nlh, \
34 (fd_), msg_len, (type_str_), (flags_str_)); \
42 #define TEST_NETLINK(fd_, nlh0_, type_, flags_, \ argument
44 TEST_NETLINK_((fd_), (nlh0_), \
49 #define TEST_NETLINK_OBJECT_EX_(fd_, nlh0_, \ argument
61 TEST_NETLINK_((fd_), (nlh0_), \
67 TEST_NETLINK_((fd_), (nlh0_), \
75 TEST_NETLINK_((fd_), (nlh0_), \
83 #define TEST_NETLINK_OBJECT_EX(fd_, nlh0_, \ argument
[all …]
/external/bsdiff/
Dfile.cc39 if (fd_ < 0) { in Read()
43 ssize_t rc = TEMP_FAILURE_RETRY(read(fd_, buf, count)); in Read()
51 if (fd_ < 0) { in Write()
55 ssize_t rc = TEMP_FAILURE_RETRY(write(fd_, buf, count)); in Write()
63 if (fd_ < 0) { in Seek()
68 off_t newpos = lseek(fd_, pos, SEEK_SET); in Seek()
79 if (fd_ < 0) { in Close()
83 bool success = close(fd_) == 0; in Close()
86 fd_ = -1; in Close()
92 if (fstat(fd_, &stbuf) == -1) in GetSize()
[all …]
/external/grpc-grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/
Dgrpc_ares_ev_driver_posix.cc46 fd_ = grpc_fd_create((int)as, name_, false); in GrpcPolledFdPosix()
48 grpc_pollset_set_add_fd(driver_pollset_set_, fd_); in GrpcPolledFdPosix()
53 grpc_pollset_set_del_fd(driver_pollset_set_, fd_); in ~GrpcPolledFdPosix()
58 grpc_fd_orphan(fd_, nullptr, &dummy_release_fd, "c-ares query finished"); in ~GrpcPolledFdPosix()
62 grpc_fd_notify_on_read(fd_, read_closure); in RegisterForOnReadableLocked()
66 grpc_fd_notify_on_write(fd_, write_closure); in RegisterForOnWriteableLocked()
71 return ioctl(grpc_fd_wrapped_fd(fd_), FIONREAD, &bytes_available) == 0 && in IsFdStillReadableLocked()
76 grpc_fd_shutdown(fd_, error); in ShutdownLocked()
85 grpc_fd* fd_; member in grpc_core::GrpcPolledFdPosix
/external/libchrome/base/
Drand_util_posix.cc29 URandomFd() : fd_(HANDLE_EINTR(open("/dev/urandom", O_RDONLY))) { in URandomFd()
30 DCHECK_GE(fd_, 0) << "Cannot open /dev/urandom: " << errno; in URandomFd()
33 URandomFd() : fd_(HANDLE_EINTR(open("/dev/urandom", O_RDONLY | O_CLOEXEC))) {
34 DCHECK_GE(fd_, 0) << "Cannot open /dev/urandom: " << errno;
38 ~URandomFd() { close(fd_); } in ~URandomFd()
40 int fd() const { return fd_; } in fd()
43 const int fd_; member in __anondb73efc70111::URandomFd
/external/perfetto/src/base/
Dunix_socket.cc141 : fd_(std::move(fd)), type_(type) { in UnixSocketRaw()
142 PERFETTO_CHECK(fd_); in UnixSocketRaw()
145 setsockopt(*fd_, SOL_SOCKET, SO_NOSIGPIPE, &no_sigpipe, sizeof(no_sigpipe)); in UnixSocketRaw()
150 int fcntl_res = fcntl(*fd_, F_SETFD, FD_CLOEXEC); in UnixSocketRaw()
155 PERFETTO_DCHECK(fd_); in SetBlocking()
156 int flags = fcntl(*fd_, F_GETFL, 0); in SetBlocking()
162 bool fcntl_res = fcntl(*fd_, F_SETFL, flags); in SetBlocking()
167 PERFETTO_DCHECK(fd_); in RetainOnExec()
168 int flags = fcntl(*fd_, F_GETFD, 0); in RetainOnExec()
170 bool fcntl_res = fcntl(*fd_, F_SETFD, flags); in RetainOnExec()
[all …]
Devent.cc33 fd_.reset(eventfd(/* start value */ 0, EFD_CLOEXEC | EFD_NONBLOCK)); in Event()
34 PERFETTO_CHECK(fd_); in Event()
39 fd_ = std::move(pipe.rd); in Event()
50 ssize_t ret = write(fd_.get(), &value, sizeof(value)); in Notify()
63 ssize_t ret = read(fd_.get(), &value, sizeof(value)); in Clear()
68 ssize_t ret = read(fd_.get(), &buffer[0], sizeof(buffer)); in Clear()
/external/puffin/src/
Dfile_stream.cc38 auto cur_off = lseek(fd_, 0, SEEK_CUR); in GetSize()
40 auto fsize = lseek(fd_, 0, SEEK_END); in GetSize()
42 cur_off = lseek(fd_, cur_off, SEEK_SET); in GetSize()
49 auto off = lseek(fd_, 0, SEEK_CUR); in GetOffset()
56 auto off = lseek(fd_, offset, SEEK_SET); in Seek()
66 read(fd_, c_bytes + total_bytes_read, length - total_bytes_read); in Read()
79 write(fd_, c_bytes + total_bytes_wrote, length - total_bytes_wrote); in Write()
87 return close(fd_) == 0; in Close()
/external/libchrome/base/files/
Ddir_reader_linux.h34 : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), in DirReaderLinux()
41 if (fd_ >= 0) { in ~DirReaderLinux()
42 if (IGNORE_EINTR(close(fd_))) in ~DirReaderLinux()
48 return fd_ >= 0; in IsValid()
61 const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); in Next()
83 return fd_; in fd()
91 const int fd_;
Dfile_descriptor_watcher_posix.cc80 const int fd_; member in base::FileDescriptorWatcher::Controller::Watcher
100 fd_(fd) { in Watcher()
114 fd_, false, mode_, &fd_watch_controller_, this)) { in StartWatching()
118 DLOG(ERROR) << "Failed to watch fd=" << fd_; in StartWatching()
129 DCHECK_EQ(fd_, fd); in OnFileCanReadWithoutBlocking()
140 DCHECK_EQ(fd_, fd); in OnFileCanWriteWithoutBlocking()
/external/google-breakpad/src/client/linux/handler/
Dminidump_descriptor.h53 fd_(-1), in MinidumpDescriptor()
58 fd_(-1), in MinidumpDescriptor()
67 fd_(fd), in MinidumpDescriptor()
75 fd_(-1), in MinidumpDescriptor()
85 int fd() const { return fd_; } in fd()
114 int fd_; variable
Dminidump_descriptor.cc44 fd_(descriptor.fd_), in MinidumpDescriptor()
59 fd_ = descriptor.fd_; in operator =()
/external/libbrillo/brillo/streams/
Dfile_stream.cc31 FileDescriptor(int fd, bool own) : fd_{fd}, own_{own} {} in FileDescriptor()
39 bool IsOpen() const override { return fd_ >= 0; } in IsOpen()
42 return HANDLE_EINTR(read(fd_, buf, nbyte)); in Read()
46 return HANDLE_EINTR(write(fd_, buf, nbyte)); in Write()
50 return lseek64(fd_, offset, whence); in Seek()
55 if (fstat(fd_, &file_stat) < 0) in GetFileMode()
62 if (fstat(fd_, &file_stat) < 0) in GetSize()
68 return HANDLE_EINTR(ftruncate(fd_, length)); in Truncate()
77 std::swap(fd, fd_); in Close()
90 fd_, in WaitForData()
[all …]
/external/tensorflow/tensorflow/core/platform/profile_utils/
Dandroid_armv7a_cpu_utils_helper.cc44 ioctl(fd_, PERF_EVENT_IOC_RESET, 0); in ResetClockCycle()
52 read(fd_, &count, sizeof(long long)); in GetCurrentClockCycle()
70 ioctl(fd_, PERF_EVENT_IOC_ENABLE, 0); in EnableClockCycleProfiling()
72 ioctl(fd_, PERF_EVENT_IOC_DISABLE, 0); in EnableClockCycleProfiling()
91 fd_ = OpenPerfEvent(&pe, 0, -1, -1, 0); in InitializeInternal()
92 if (fd_ == INVALID_FD) { in InitializeInternal()
/external/libchrome/mojo/public/cpp/platform/
Dplatform_handle.cc103 : type_(Type::kFd), fd_(std::move(fd)) { in PlatformHandle()
105 DCHECK_LT(fd_.get(), FDIO_MAX_FD); in PlatformHandle()
125 fd_ = std::move(other.fd_); in operator =()
216 fd_.reset(); in reset()
232 ignore_result(fd_.release()); in release()
242 return PlatformHandle(CloneFD(fd_)); in Clone()
246 return PlatformHandle(CloneFD(fd_)); in Clone()
248 return PlatformHandle(CloneFD(fd_)); in Clone()
/external/perfetto/include/perfetto/ipc/
Dasync_result.h42 : msg_(std::move(msg)), has_more_(has_more), fd_(fd) { in msg_()
59 void set_fd(int fd) { fd_ = fd; } in set_fd()
60 int fd() const { return fd_; } in fd()
68 int fd_ = -1; variable

1234