Home
last modified time | relevance | path

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

12

/packages/modules/Bluetooth/tools/rootcanal/net/posix/
Dposix_async_socket.cc42 : fd_(fd), am_(am), watching_(false) { in PosixAsyncSocket()
59 fd_ = other.fd_; in PosixAsyncSocket()
63 other.fd_ = -1; in PosixAsyncSocket()
69 if (fd_ == -1) { in Recv()
76 REPEAT_UNTIL_NO_INTR(res = read(fd_, buffer, bufferSize)); in Recv()
79 DD("Recv < 0: {} ({})", strerror(errno), fd_); in Recv()
81 DD("{} bytes ({})", res, fd_); in Recv()
98 REPEAT_UNTIL_NO_INTR(res = send(fd_, buffer, bufferSize, sendFlags)); in Send()
100 DD("{} bytes ({})", res, fd_); in Send()
105 if (fd_ == -1) { in Connected()
[all …]
Dposix_async_socket.h77 int fd() const { return fd_; } in fd()
82 int fd_; variable
/packages/modules/Bluetooth/system/gd/os/linux_generic/
Dreactor_unittest.cc60 SampleReactable() : fd_(eventfd(0, EFD_NONBLOCK)) { in SampleReactable()
61 EXPECT_NE(fd_, -1); in SampleReactable()
65 close(fd_); in ~SampleReactable()
72 int fd_; member in bluetooth::os::__anon1aab34370111::SampleReactable
83 FakeReactable() : fd_(eventfd(0, 0)), reactor_(nullptr) { in FakeReactable()
84 EXPECT_NE(fd_, -1); in FakeReactable()
87 FakeReactable(Reactor* reactor) : fd_(eventfd(0, 0)), reactor_(reactor) { in FakeReactable()
88 EXPECT_NE(fd_, -1); in FakeReactable()
92 close(fd_); in ~FakeReactable()
98 auto read_result = eventfd_read(fd_, &value); in OnReadReady()
[all …]
Dalarm.cc41 Alarm::Alarm(Handler* handler) : handler_(handler), fd_(TIMERFD_CREATE(ALARM_CLOCK, 0)) { in Alarm()
42 log::assert_that(fd_ != -1, "cannot create timerfd: {}", strerror(errno)); in Alarm()
45 fd_, common::Bind(&Alarm::on_fire, common::Unretained(this)), Closure()); in Alarm()
52 RUN_NO_INTR(close_status = TIMERFD_CLOSE(fd_)); in ~Alarm()
60 int result = TIMERFD_SETTIME(fd_, 0, &timer_itimerspec, nullptr); in Schedule()
69 int result = TIMERFD_SETTIME(fd_, 0, &disarm_itimerspec, nullptr); in Cancel()
77 auto bytes_read = read(fd_, &times_invoked, sizeof(uint64_t)); in on_fire()
86 fd_); in on_fire()
Dreactor.cc47 fd_ = eventfd(0, EFD_SEMAPHORE | EFD_NONBLOCK); in impl()
48 log::assert_that(fd_ != -1, "Unable to create nonblocking event file descriptor semaphore"); in impl()
51 log::assert_that(fd_ != -1, "Unable to close a never-opened event file descriptor"); in ~impl()
52 close(fd_); in ~impl()
53 fd_ = -1; in ~impl()
55 int fd_ = -1; member
65 return eventfd_read(pimpl_->fd_, &val) == 0; in Read()
68 return pimpl_->fd_; in Id()
72 while (eventfd_read(pimpl_->fd_, &val) == 0) { in Clear()
77 RUN_NO_INTR(close_status = close(pimpl_->fd_)); in Close()
[all …]
Dthread_unittest.cc33 …explicit SampleReactable(Thread* thread) : thread_(thread), fd_(eventfd(0, 0)), is_same_thread_che… in SampleReactable()
34 EXPECT_NE(fd_, 0); in SampleReactable()
38 close(fd_); in ~SampleReactable()
45 eventfd_read(fd_, &val); in OnReadReady()
53 int fd_; member in bluetooth::os::__anonbf63a0bf0111::SampleReactable
89 sample_reactable.fd_, in TEST_F()
92 int fd = sample_reactable.fd_; in TEST_F()
Dreactive_semaphore.cc32 ReactiveSemaphore::ReactiveSemaphore(unsigned int value) : fd_(eventfd(value, EFD_SEMAPHORE | EFD_N… in ReactiveSemaphore()
33 log::assert_that(fd_ != -1, "assert failed: fd_ != -1"); in ReactiveSemaphore()
38 RUN_NO_INTR(close_status = close(fd_)); in ~ReactiveSemaphore()
44 auto read_result = eventfd_read(fd_, &val); in Decrease()
50 auto write_result = eventfd_write(fd_, val); in Increase()
55 return fd_; in GetFd()
Drepeating_alarm.cc40 RepeatingAlarm::RepeatingAlarm(Handler* handler) : handler_(handler), fd_(TIMERFD_CREATE(ALARM_CLOC… in RepeatingAlarm()
41 log::assert_that(fd_ != -1, "assert failed: fd_ != -1"); in RepeatingAlarm()
44 fd_, common::Bind(&RepeatingAlarm::on_fire, common::Unretained(this)), common::Closure()); in RepeatingAlarm()
51 RUN_NO_INTR(close_status = TIMERFD_CLOSE(fd_)); in ~RepeatingAlarm()
60 int result = TIMERFD_SETTIME(fd_, 0, &timer_itimerspec, nullptr); in Schedule()
69 int result = TIMERFD_SETTIME(fd_, 0, &disarm_itimerspec, nullptr); in Cancel()
77 auto bytes_read = read(fd_, &times_invoked, sizeof(uint64_t)); in on_fire()
Dreactive_semaphore.h41 int fd_;
/packages/providers/MediaProvider/pdf/framework/libs/pdfClient/
Dfile.cc44 FileReader::FileReader(LinuxFileOps::FDCloser fd) : fd_(std::move(fd)) { in FileReader()
45 complete_size_ = GetFileSize(fd_.get()); in FileReader()
50 : fd_(std::move(fd)), complete_size_(completeSize) { in FileReader()
56 fd_(std::move(fr.fd_)), in FileReader()
62 return fd_.Release(); in ReleaseFd()
66 return GetFileSize(fd_.get()) >= complete_size_; in IsComplete()
71 return pos + size >= pos && pos + size <= GetFileSize(fd_.get()); in CanReadBlock()
78 if (lseek(fd_.get(), pos, SEEK_SET) == -1) { in DoReadBlock()
81 return read(fd_.get(), buffer, size); in DoReadBlock()
125 FileWriter::FileWriter(LinuxFileOps::FDCloser fd) : fd_(std::move(fd)) { in FileWriter()
[all …]
Dlinux_fileops.cc35 LinuxFileOps::FDCloser::FDCloser(int fd) : fd_(fd) {} in FDCloser()
37 LinuxFileOps::FDCloser::FDCloser(LinuxFileOps::FDCloser&& orig) : fd_(orig.Release()) {} in FDCloser()
42 fd_ = orig.Release(); in operator =()
52 return fd_; in get()
64 int ret = fd_; in Release()
65 fd_ = kCanonicalInvalidFd; in Release()
70 std::swap(fd_, other->fd_); in Swap()
Dfile.h56 int Fd() const { return fd_.get(); } in Fd()
69 LinuxFileOps::FDCloser fd_; // File-descriptor.
95 int Fd() { return fd_.get(); } in Fd()
100 LinuxFileOps::FDCloser fd_; // File-descriptor.
Dlinux_fileops.h84 int fd_; variable
/packages/modules/adb/client/openscreen/platform/
Dudp_socket.cpp161 : client_(client), local_endpoint_(local_endpoint), fd_(std::move(fd)) { in AdbUdpSocket()
164 fde_ = fdevent_create(fd_.get(), OnFdeventResult, this); in AdbUdpSocket()
170 LOG(INFO) << __func__ << " fd=" << fd_.get(); in AdbUdpSocket()
194 if (adb_getsockname(fd_, reinterpret_cast<struct sockaddr*>(&address), in GetLocalEndpoint()
208 if (adb_getsockname(fd_, reinterpret_cast<struct sockaddr*>(&address), in GetLocalEndpoint()
266 if (!fd_.ok()) { in SetMulticastOutboundInterface()
283 if (getsockopt(fd_.get(), IPPROTO_IP, IP_MULTICAST_IF, &default_addr, &buf_size) != in SetMulticastOutboundInterface()
291 if (adb_setsockopt(fd_, IPPROTO_IP, IP_MULTICAST_IF, &multicast_properties, in SetMulticastOutboundInterface()
300 if (getsockopt(fd_.get(), IPPROTO_IP, IP_MULTICAST_IF, &default_addr, &buf_size) != in SetMulticastOutboundInterface()
313 if (adb_setsockopt(fd_, IPPROTO_IPV6, IPV6_MULTICAST_IF, &index, sizeof(index)) == in SetMulticastOutboundInterface()
[all …]
/packages/modules/adb/
Dshell_service_protocol.cpp25 ShellProtocol::ShellProtocol(borrowed_fd fd) : fd_(fd) { in ShellProtocol()
35 if (!ReadFdExactly(fd_, buffer_, kHeaderSize)) { in Read()
46 if (read_length && !ReadFdExactly(fd_, data(), read_length)) { in Read()
61 return WriteFdExactly(fd_, buffer_, kHeaderSize + length); in Write()
Dtransport_fd.cpp47 NonblockingFdConnection(unique_fd fd) : started_(false), fd_(std::move(fd)) { in NonblockingFdConnection()
48 set_file_block_mode(fd_.get(), false); in NonblockingFdConnection()
66 {.fd = fd_.get(), .events = POLLIN}, in Run()
97 rc = adb_read(fd_.get(), &block[0], block.size()); in Run()
179 ssize_t rc = adb_writev(fd_.get(), iovs.data(), iovs.size()); in DispatchWrites()
228 unique_fd fd_; member
Dshell_protocol.h107 borrowed_fd fd_; variable
/packages/modules/adb/fastdeploy/deploypatchgenerator/
Dapk_archive.cpp70 fd_.reset(adb_open(path_.c_str(), O_RDONLY)); in ApkArchive()
71 if (fd_ == -1) { in ApkArchive()
115 FileRegion mapped(fd_, readOffset, sizeToRead); in FindEndOfCDRecord()
165 FileRegion mapped(fd_, eocdRecord, cdEntryHeaderSizeBytes); in GetCDLocation()
187 FileRegion mapped(fd_, signatureOffset, endOfSignatureSize); in GetSignatureLocation()
205 FileRegion mapped(fd_, loc.offset, loc.size); in ReadMetadata()
342 FileRegion lfhMapped(fd_, localFileHeaderOffset, sizeof(LocalFileHeader)); in CalculateLocalFileEntrySize()
383 FileRegion ddMapped(fd_, ddOffset, sizeof(uint32_t) + sizeof(DataDescriptor)); in CalculateLocalFileEntrySize()
Dapk_archive.h75 bool ready() const { return fd_ >= 0; } in ready()
79 unique_fd fd_; variable
/packages/modules/adb/pairing_connection/
Dpairing_connection.cpp148 unique_fd fd_; member
161 fd_.reset(); in ~PairingConnectionCtx()
173 fd_); in SetupTlsConnection()
176 LOG(ERROR) << "Unable to start TlsConnection. Unable to pair fd=" << fd_.get(); in SetupTlsConnection()
186 LOG(ERROR) << "Failed to handshake with the peer fd=" << fd_.get(); in SetupTlsConnection()
273 cb_(p, fd_.get(), opaque_); in NotifyResult()
281 fd_.reset(fd); in Start()
/packages/modules/adb/daemon/
Dabb.cpp33 explicit AdbFdTextOutput(borrowed_fd fd) : fd_(fd) {} in AdbFdTextOutput()
37 return WriteFdExactly(fd_, txt, len) ? android::OK : -errno; in print()
48 borrowed_fd fd_; member in __anon260de5440111::AdbFdTextOutput
/packages/modules/Bluetooth/system/main/test/
Dmain_shim_test.cc105 DevNullOrStdErr() { fd_ = open("/dev/null", O_CLOEXEC | O_WRONLY); } in DevNullOrStdErr()
107 if (fd_ != -1) { in ~DevNullOrStdErr()
108 close(fd_); in ~DevNullOrStdErr()
110 fd_ = -1; in ~DevNullOrStdErr()
112 int Fd() const { return (fd_ == -1) ? STDERR_FILENO : fd_; } in Fd()
115 int fd_{-1}; member in __anon5cdfe7990111::DevNullOrStdErr
/packages/modules/adb/tls/
Dtls_connection.cpp80 borrowed_fd fd_; member in adb::tls::__anon687488e00111::TlsConnectionImpl
87 : role_(role), fd_(fd) { in TlsConnectionImpl()
268 if (!SSL_set_fd(ssl_.get(), fd_.get())) { in DoHandshake()
/packages/modules/Bluetooth/system/gd/os/
Drepeating_alarm.h54 int fd_ = 0; variable
Dalarm.h54 int fd_ = 0; variable

12