/system/netd/libnetdutils/include/netdutils/ |
Fd.h | 29 class Fd { 31 constexpr Fd() = default; 33 constexpr Fd(int fd) : mFd(fd) {} 37 bool operator==(const Fd& other) const { return get() == other.get(); } 38 bool operator!=(const Fd& other) const { return get() != other.get(); } 44 // Return true if fd appears valid (non-negative) 45 inline bool isWellFormed(const Fd fd) { [all...] |
UniqueFd.h | 23 #include "netdutils/Fd.h" 31 // *) Uses a strongly typed wrapper (Fd) for the underlying file descriptor 40 UniqueFd(Fd fd) : mFd(fd) {} 55 // Cleanup any currently owned Fd, replacing it with the optional 56 // parameter fd 57 void reset(Fd fd = Fd()); [all...] |
SocketOption.h | 24 #include "netdutils/Fd.h" 36 Status enableSockopt(Fd sock, int level, int optname); 55 Status enableTcpKeepAlives(Fd sock, unsigned idleTime, unsigned numProbes, unsigned probeInterval);
|
MockSyscalls.h | 39 MOCK_CONST_METHOD3(getsockname, Status(Fd sock, sockaddr* addr, socklen_t* addrlen)); 40 MOCK_CONST_METHOD5(getsockopt, Status(Fd sock, int level, int optname, void* optval, 42 MOCK_CONST_METHOD5(setsockopt, Status(Fd sock, int level, int optname, const void* optval, 45 MOCK_CONST_METHOD3(bind, Status(Fd sock, const sockaddr* addr, socklen_t addrlen)); 46 MOCK_CONST_METHOD3(connect, Status(Fd sock, const sockaddr* addr, socklen_t addrlen)); 52 MOCK_CONST_METHOD2(writev, StatusOr<size_t>(Fd fd, const std::vector<iovec>& iov)); 53 MOCK_CONST_METHOD2(write, StatusOr<size_t>(Fd fd, const Slice buf)); 54 MOCK_CONST_METHOD2(read, StatusOr<Slice>(Fd fd, const Slice buf)) [all...] |
Syscalls.h | 48 virtual Status getsockname(Fd sock, sockaddr* addr, socklen_t* addrlen) const = 0; 50 virtual Status getsockopt(Fd sock, int level, int optname, void *optval, 53 virtual Status setsockopt(Fd sock, int level, int optname, const void* optval, 56 virtual Status bind(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0; 58 virtual Status connect(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0; 64 virtual StatusOr<size_t> writev(Fd fd, const std::vector<iovec>& iov) const = 0; 66 virtual StatusOr<size_t> write(Fd fd, const Slice buf) const = 0; 68 virtual StatusOr<Slice> read(Fd fd, const Slice buf) const = 0 [all...] |
/system/netd/libnetdutils/ |
Fd.cpp | 17 #include "netdutils/Fd.h" 22 std::ostream& operator<<(std::ostream& os, const Fd& fd) { 23 return os << "Fd[" << fd.get() << "]";
|
UniqueFd.cpp | 25 void UniqueFd::reset(Fd fd) { 27 std::swap(fd, mFd); 28 if (isWellFormed(fd)) { 29 expectOk(sys.close(fd)); 33 std::ostream& operator<<(std::ostream& os, const UniqueFd& fd) { 34 return os << "UniqueFd[" << static_cast<Fd>(fd) << "]";
|
FdTest.cpp | 33 // Force implicit conversion from UniqueFd -> Fd 34 inline Fd toFd(const UniqueFd& fd) { 35 return fd; 40 TEST(Fd, smoke) { 42 Fd fd1(1); 43 Fd fd2(fd1); 44 Fd fd3 = fd1; 45 const Fd fd4(8); 46 const Fd fd5(fd4) [all...] |
SocketOption.cpp | 29 Status enableSockopt(Fd sock, int level, int optname) { 35 Status enableTcpKeepAlives(Fd sock, unsigned idleTime, unsigned numProbes, unsigned probeInterval) {
|
SyscallsTest.cpp | 60 constexpr Fd kFd(40); 71 constexpr Fd kFd(40); 77 .WillOnce(Invoke([expected](Fd, sockaddr* addr, socklen_t* addrlen) { 93 constexpr Fd kFd(40); 112 constexpr Fd kFd(40); 132 constexpr Fd kFd(40); 149 constexpr Fd kFd(40); 166 constexpr Fd kFd(40); 180 constexpr Fd kFd(40); 190 .WillOnce(Invoke([expected, used](Fd, const Slice, int, sockaddr* src, socklen_t* srclen) [all...] |
/external/llvm/lib/Support/ |
DataStream.cpp | 55 int Fd; 57 DataFileStreamer() : Fd(0) {} 58 ~DataFileStreamer() override { close(Fd); } 61 return read(Fd, buf, len); 66 Fd = 0; 71 return sys::fs::openFileForRead(Filename, Fd);
|
/external/ltp/testcases/kernel/syscalls/select/ |
select01.c | 37 * 1.) select(2) to a fd of regular file with no I/O and small timeout 59 int Fd = -1; 109 if ((Fd = open(FILENAME, O_CREAT | O_RDWR, 0777)) == -1) 114 FD_SET(Fd, &Readfds); 119 if (Fd >= 0) { 120 if (close(Fd) == -1) 122 Fd = -1;
|
select03.c | 38 * 1.) select(2) of fd of a named-pipe (FIFO) with no I/O and small timeout value 61 int Fd; 119 if ((Fd = open(FILENAME, O_RDWR)) == -1) { 126 FD_SET(Fd, &saved_Readfds); 127 FD_SET(Fd, &saved_Writefds); 132 close(Fd);
|
select02.c | 39 * 1.) select(2) to fd of system pipe with no I/O and small timeout 57 int Fd[2]; 108 SAFE_PIPE(NULL, Fd); 112 FD_SET(Fd[0], &saved_Readfds); 113 FD_SET(Fd[1], &saved_Writefds);
|
/external/swiftshader/third_party/subzero/pnacl-llvm/ |
DataStream.cpp | 55 int Fd; 57 DataFileStreamer() : Fd(0) {} 58 ~DataFileStreamer() override { close(Fd); } 61 return read(Fd, buf, len); 66 Fd = 0; 71 return sys::fs::openFileForRead(Filename, Fd);
|
/external/compiler-rt/lib/scudo/ |
scudo_utils.cpp | 102 // readRetry will attempt to read Count bytes from the Fd specified, and if 104 static ssize_t readRetry(int Fd, u8 *Buffer, size_t Count) { 107 ssize_t Result = read(Fd, Buffer + AmountRead, Count - AmountRead); 122 int Fd = open("/dev/urandom", O_RDONLY); 123 bool Success = readRetry(Fd, reinterpret_cast<u8 *>(&State_0_), 125 Success &= readRetry(Fd, reinterpret_cast<u8 *>(&State_1_), 127 close(Fd);
|
/device/generic/goldfish/wifi/createns/ |
createns.cpp | 38 class Fd { 40 explicit Fd(int fd) : mFd(fd) { } 41 Fd(const Fd&) = delete; 42 ~Fd() { 50 Fd& operator=(const Fd&) = delete; 105 Fd fd(::open(path.c_str() [all...] |
/prebuilts/clang/host/linux-x86/clang-4053586/prebuilt_include/llvm/lib/Fuzzer/ |
FuzzerIO.h | 62 FILE* OpenFile(int Fd, const char *Mode); 64 int CloseFile(int Fd); 66 int DuplicateFile(int Fd); 70 void DiscardOutput(int Fd); 72 intptr_t GetHandleFromFd(int fd);
|
/prebuilts/clang/host/linux-x86/clang-4393122/prebuilt_include/llvm/lib/Fuzzer/ |
FuzzerIO.h | 62 FILE* OpenFile(int Fd, const char *Mode); 64 int CloseFile(int Fd); 66 int DuplicateFile(int Fd); 70 void DiscardOutput(int Fd); 72 intptr_t GetHandleFromFd(int fd);
|
/prebuilts/clang/host/linux-x86/clang-4479392/prebuilt_include/llvm/lib/Fuzzer/ |
FuzzerIO.h | 62 FILE* OpenFile(int Fd, const char *Mode); 64 int CloseFile(int Fd); 66 int DuplicateFile(int Fd); 70 void DiscardOutput(int Fd); 72 intptr_t GetHandleFromFd(int fd);
|
/prebuilts/clang/host/linux-x86/clang-4579689/prebuilt_include/llvm/lib/Fuzzer/ |
FuzzerIO.h | 71 FILE* OpenFile(int Fd, const char *Mode); 73 int CloseFile(int Fd); 75 int DuplicateFile(int Fd); 79 void DiscardOutput(int Fd); 81 intptr_t GetHandleFromFd(int fd);
|
/prebuilts/clang/host/linux-x86/clang-4630689/prebuilt_include/llvm/lib/Fuzzer/ |
FuzzerIO.h | 71 FILE* OpenFile(int Fd, const char *Mode); 73 int CloseFile(int Fd); 75 int DuplicateFile(int Fd); 79 void DiscardOutput(int Fd); 81 intptr_t GetHandleFromFd(int fd);
|
/prebuilts/clang/host/linux-x86/clang-4639204/prebuilt_include/llvm/lib/Fuzzer/ |
FuzzerIO.h | 71 FILE* OpenFile(int Fd, const char *Mode); 73 int CloseFile(int Fd); 75 int DuplicateFile(int Fd); 79 void DiscardOutput(int Fd); 81 intptr_t GetHandleFromFd(int fd);
|
/prebuilts/clang/host/linux-x86/clang-4691093/prebuilt_include/llvm/lib/Fuzzer/ |
FuzzerIO.h | 71 FILE* OpenFile(int Fd, const char *Mode); 73 int CloseFile(int Fd); 75 int DuplicateFile(int Fd); 79 void DiscardOutput(int Fd); 81 intptr_t GetHandleFromFd(int fd);
|
/art/libartbase/base/ |
scoped_flock.cc | 39 // responsible for flushing its underlying FD. Its only purpose should be 50 int flock_result = TEMP_FAILURE_RETRY(flock(file->Fd(), operation)); 60 int fstat_result = TEMP_FAILURE_RETRY(fstat(file->Fd(), &fstat_stat)); 93 ScopedFlock LockedFile::DupOf(const int fd, const std::string& path, 96 // responsible for flushing its underlying FD. Its only purpose should be 101 new LockedFile(dup(fd), path, false /* check_usage */, read_only_mode)); 102 if (locked_file->Fd() == -1) { 107 if (0 != TEMP_FAILURE_RETRY(flock(locked_file->Fd(), LOCK_EX))) { 117 if (this->Fd() != -1) { 118 int flock_result = TEMP_FAILURE_RETRY(flock(this->Fd(), LOCK_UN)) [all...] |