Home
last modified time | relevance | path

Searched refs:read_fd (Results 1 – 25 of 61) sorted by relevance

123

/external/abseil-cpp/absl/debugging/internal/
Daddress_is_readable.cc52 static uint64_t Pack(uint64_t pid, uint64_t read_fd, uint64_t write_fd) { in Pack() argument
53 ABSL_RAW_CHECK((read_fd >> 24) == 0 && (write_fd >> 24) == 0, in Pack()
55 return (pid << 48) | ((read_fd & 0xffffff) << 24) | (write_fd & 0xffffff); in Pack()
60 static void Unpack(uint64_t x, int *pid, int *read_fd, int *write_fd) { in Unpack() argument
62 *read_fd = (x >> 24) & 0xffffff; in Unpack()
87 int read_fd; in AddressIsReadable() local
90 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
109 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
120 while (read(read_fd, &c, 1) == -1 && errno == EINTR) { in AddressIsReadable()
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/debugging/internal/
Daddress_is_readable.cc52 static uint64_t Pack(uint64_t pid, uint64_t read_fd, uint64_t write_fd) { in Pack() argument
53 ABSL_RAW_CHECK((read_fd >> 24) == 0 && (write_fd >> 24) == 0, in Pack()
55 return (pid << 48) | ((read_fd & 0xffffff) << 24) | (write_fd & 0xffffff); in Pack()
60 static void Unpack(uint64_t x, int *pid, int *read_fd, int *write_fd) { in Unpack() argument
62 *read_fd = (x >> 24) & 0xffffff; in Unpack()
88 int read_fd; in AddressIsReadable() local
91 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
110 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
121 while (read(read_fd, &c, 1) == -1 && errno == EINTR) { in AddressIsReadable()
/external/webrtc/third_party/abseil-cpp/absl/debugging/internal/
Daddress_is_readable.cc52 static uint64_t Pack(uint64_t pid, uint64_t read_fd, uint64_t write_fd) { in Pack() argument
53 ABSL_RAW_CHECK((read_fd >> 24) == 0 && (write_fd >> 24) == 0, in Pack()
55 return (pid << 48) | ((read_fd & 0xffffff) << 24) | (write_fd & 0xffffff); in Pack()
60 static void Unpack(uint64_t x, int *pid, int *read_fd, int *write_fd) { in Unpack() argument
62 *read_fd = (x >> 24) & 0xffffff; in Unpack()
87 int read_fd; in AddressIsReadable() local
90 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
109 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
120 while (read(read_fd, &c, 1) == -1 && errno == EINTR) { in AddressIsReadable()
/external/openscreen/third_party/abseil/src/absl/debugging/internal/
Daddress_is_readable.cc52 static uint64_t Pack(uint64_t pid, uint64_t read_fd, uint64_t write_fd) { in Pack() argument
53 ABSL_RAW_CHECK((read_fd >> 24) == 0 && (write_fd >> 24) == 0, in Pack()
55 return (pid << 48) | ((read_fd & 0xffffff) << 24) | (write_fd & 0xffffff); in Pack()
60 static void Unpack(uint64_t x, int *pid, int *read_fd, int *write_fd) { in Unpack() argument
62 *read_fd = (x >> 24) & 0xffffff; in Unpack()
88 int read_fd; in AddressIsReadable() local
91 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
110 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
121 while (read(read_fd, &c, 1) == -1 && errno == EINTR) { in AddressIsReadable()
/external/angle/third_party/abseil-cpp/absl/debugging/internal/
Daddress_is_readable.cc52 static uint64_t Pack(uint64_t pid, uint64_t read_fd, uint64_t write_fd) { in Pack() argument
53 ABSL_RAW_CHECK((read_fd >> 24) == 0 && (write_fd >> 24) == 0, in Pack()
55 return (pid << 48) | ((read_fd & 0xffffff) << 24) | (write_fd & 0xffffff); in Pack()
60 static void Unpack(uint64_t x, int *pid, int *read_fd, int *write_fd) { in Unpack() argument
62 *read_fd = (x >> 24) & 0xffffff; in Unpack()
88 int read_fd; in AddressIsReadable() local
91 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
110 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
121 while (read(read_fd, &c, 1) == -1 && errno == EINTR) { in AddressIsReadable()
/external/libtextclassifier/abseil-cpp/absl/debugging/internal/
Daddress_is_readable.cc52 static uint64_t Pack(uint64_t pid, uint64_t read_fd, uint64_t write_fd) { in Pack() argument
53 ABSL_RAW_CHECK((read_fd >> 24) == 0 && (write_fd >> 24) == 0, in Pack()
55 return (pid << 48) | ((read_fd & 0xffffff) << 24) | (write_fd & 0xffffff); in Pack()
60 static void Unpack(uint64_t x, int *pid, int *read_fd, int *write_fd) { in Unpack() argument
62 *read_fd = (x >> 24) & 0xffffff; in Unpack()
88 int read_fd; in AddressIsReadable() local
91 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
110 Unpack(local_pid_and_fds, &pid, &read_fd, &write_fd); in AddressIsReadable()
121 while (read(read_fd, &c, 1) == -1 && errno == EINTR) { in AddressIsReadable()
/external/grpc-grpc/src/core/lib/iomgr/
Dwakeup_fd_cv.cc63 fd_info->read_fd = GRPC_IDX_TO_FD(idx); in cv_fd_init()
72 g_cvfds.cvfds[GRPC_FD_TO_IDX(fd_info->read_fd)].is_set = 1; in cv_fd_wakeup()
73 cvn = g_cvfds.cvfds[GRPC_FD_TO_IDX(fd_info->read_fd)].cvs; in cv_fd_wakeup()
84 g_cvfds.cvfds[GRPC_FD_TO_IDX(fd_info->read_fd)].is_set = 0; in cv_fd_consume()
90 if (fd_info->read_fd == 0) { in cv_fd_destroy()
95 GPR_ASSERT(!g_cvfds.cvfds[GRPC_FD_TO_IDX(fd_info->read_fd)].cvs); in cv_fd_destroy()
96 g_cvfds.cvfds[GRPC_FD_TO_IDX(fd_info->read_fd)].next_free = g_cvfds.free_fds; in cv_fd_destroy()
97 g_cvfds.free_fds = &g_cvfds.cvfds[GRPC_FD_TO_IDX(fd_info->read_fd)]; in cv_fd_destroy()
Dwakeup_fd_eventfd.cc39 fd_info->read_fd = efd; in eventfd_create()
48 err = eventfd_read(fd_info->read_fd, &value); in eventfd_consume()
60 err = eventfd_write(fd_info->read_fd, 1); in eventfd_wakeup()
69 if (fd_info->read_fd != 0) close(fd_info->read_fd); in eventfd_destroy()
Dwakeup_fd_pipe.cc48 fd_info->read_fd = pipefd[0]; in pipe_init()
58 r = read(fd_info->read_fd, buf, sizeof(buf)); in pipe_consume()
80 if (fd_info->read_fd != 0) close(fd_info->read_fd); in pipe_destroy()
86 fd.read_fd = fd.write_fd = -1; in pipe_check_availability()
Dwakeup_fd_posix.h77 int read_fd; member
84 #define GRPC_WAKEUP_FD_GET_READ_FD(fd_info) ((fd_info)->read_fd)
/external/rust/crates/grpcio-sys/grpc/src/core/lib/iomgr/
Dwakeup_fd_eventfd.cc35 fd_info->read_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); in eventfd_create()
37 if (fd_info->read_fd < 0) { in eventfd_create()
47 err = eventfd_read(fd_info->read_fd, &value); in eventfd_consume()
59 err = eventfd_write(fd_info->read_fd, 1); in eventfd_wakeup()
68 if (fd_info->read_fd != 0) close(fd_info->read_fd); in eventfd_destroy()
Dwakeup_fd_pipe.cc48 fd_info->read_fd = pipefd[0]; in pipe_init()
58 r = read(fd_info->read_fd, buf, sizeof(buf)); in pipe_consume()
80 if (fd_info->read_fd != 0) close(fd_info->read_fd); in pipe_destroy()
86 fd.read_fd = fd.write_fd = -1; in pipe_check_availability()
Dwakeup_fd_posix.h77 int read_fd; member
84 #define GRPC_WAKEUP_FD_GET_READ_FD(fd_info) ((fd_info)->read_fd)
/external/grpc-grpc/test/core/iomgr/
Dwakeup_fd_cv_test.cc110 GPR_ASSERT(cvfd1.read_fd < 0); in test_poll_cv_trigger()
111 GPR_ASSERT(cvfd2.read_fd < 0); in test_poll_cv_trigger()
112 GPR_ASSERT(cvfd3.read_fd < 0); in test_poll_cv_trigger()
113 GPR_ASSERT(cvfd1.read_fd != cvfd2.read_fd); in test_poll_cv_trigger()
114 GPR_ASSERT(cvfd2.read_fd != cvfd3.read_fd); in test_poll_cv_trigger()
115 GPR_ASSERT(cvfd1.read_fd != cvfd3.read_fd); in test_poll_cv_trigger()
117 pfds[0].fd = cvfd1.read_fd; in test_poll_cv_trigger()
118 pfds[1].fd = cvfd2.read_fd; in test_poll_cv_trigger()
121 pfds[4].fd = cvfd3.read_fd; in test_poll_cv_trigger()
/external/ltp/testcases/kernel/sched/tool/
Dtime-schedule.c72 static void run_yielder(int use_threads, int read_fd);
75 static void run_low_priority(unsigned int num, int read_fd);
94 int read_fd = -1; in main() local
118 read_fd = fds[0]; in main()
154 run_low_priority(num_low_priority, read_fd); in main()
196 read(read_fd, &ch, 1); in main()
209 run_low_priority(num_low_priority, read_fd); in main()
211 run_yielder(use_threads, read_fd); in main()
227 read(read_fd, &ch, 1); in main()
308 static void run_yielder(int use_threads, int read_fd) in run_yielder() argument
[all …]
/external/ltp/testcases/kernel/syscalls/ftruncate/
Dftruncate03.c31 static int sock_fd, read_fd, fd; variable
40 {&read_fd, 4, EINVAL},
69 read_fd = SAFE_OPEN(TESTFILE1, O_RDONLY | O_CREAT, 0644); in setup()
79 if (read_fd > 0) in cleanup()
80 SAFE_CLOSE(read_fd); in cleanup()
/external/grpc-grpc/test/core/network_benchmarks/
Dlow_level_ping_pong.cc49 int read_fd; member
94 return read_bytes(args->fds.read_fd, buf, args->msg_size, 0); in blocking_read_bytes()
98 return read_bytes(args->fds.read_fd, buf, args->msg_size, 1); in spin_read_bytes()
136 return poll_read_bytes(args->fds.read_fd, buf, args->msg_size, 0); in poll_read_bytes_blocking()
140 return poll_read_bytes(args->fds.read_fd, buf, args->msg_size, 1); in poll_read_bytes_spin()
162 GPR_ASSERT(ev.data.fd == args->fds.read_fd); in epoll_read_bytes()
166 read(args->fds.read_fd, buf + bytes_read, read_size - bytes_read); in epoll_read_bytes()
220 grpc_set_socket_nonblocking(args->fds.read_fd, 1))) { in set_socket_nonblocking()
247 ev.data.fd = args->fds.read_fd; in epoll_setup()
248 if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, args->fds.read_fd, &ev) < 0) { in epoll_setup()
[all …]
/external/python/cpython3/Lib/test/
Dtest_thread.py223 self.read_fd, self.write_fd = os.pipe()
230 def fork_thread(read_fd, write_fd): argument
241 os.close(read_fd)
247 thread.start_new_thread(fork_thread, (self.read_fd, self.write_fd))
248 self.assertEqual(os.read(self.read_fd, 2), b"OK")
256 os.close(self.read_fd)
/external/python/cffi/testing/
Dsupport.py49 self.read_fd, self.write_fd = os.pipe()
59 self._value = os.read(self.read_fd, 512)
60 os.close(self.read_fd)
/external/ltp/testcases/kernel/ipc/pipeio/
Dpipeio.c122 static int read_fd; variable
476 read_fd = fds[0]; in setup()
523 close(read_fd); in do_child()
626 read_fd = SAFE_OPEN(cleanup, pname, O_RDONLY); in do_parent()
627 if (ndelay && fcntl(read_fd, F_SETFL, O_NONBLOCK) == -1) { in do_parent()
665 nb = lio_read_buffer(read_fd, iotype, readbuf, size, in do_parent()
714 SAFE_CLOSE(cleanup, read_fd); in do_parent()
/external/python/cpython2/Lib/test/
Dtest_thread.py230 self.read_fd, self.write_fd = os.pipe()
244 os.close(self.read_fd)
259 self.assertEqual(os.read(self.read_fd, 2), "OK",
265 os.close(self.read_fd)
/external/rust/crates/grpcio-sys/grpc/third_party/cares/cares/
Dares_process.c68 ares_socket_t read_fd, struct timeval *now);
70 ares_socket_t read_fd, struct timeval *now);
124 fd_set *read_fds, ares_socket_t read_fd, in processfds() argument
130 read_tcp_data(channel, read_fds, read_fd, &now); in processfds()
131 read_udp_packets(channel, read_fds, read_fd, &now); in processfds()
148 ares_socket_t read_fd, /* use ARES_SOCKET_BAD or valid in ares_process_fd() argument
152 processfds(channel, NULL, read_fd, NULL, write_fd); in ares_process_fd()
363 ares_socket_t read_fd, struct timeval *now) in read_tcp_data() argument
369 if(!read_fds && (read_fd == ARES_SOCKET_BAD)) in read_tcp_data()
385 if(server->tcp_socket != read_fd) in read_tcp_data()
[all …]
/external/elfutils/src/
Dstrings.c52 static int read_fd (int fd, const char *fname, off_t fdlen);
174 result = read_fd (STDIN_FILENO, in main()
202 result |= read_fd (fd, fname, fdlen); in main()
688 read_fd (int fd, const char *fname, off_t fdlen) in read_fd() function
705 return read_fd (fd, fname, fdlen); in read_elf()
/external/linux-kselftest/tools/testing/selftests/powerpc/pmu/
Dlib.c38 FAIL_IF(read(read_pipe.read_fd, &c, 1) != 1); in sync_with_child()
49 FAIL_IF(read(read_pipe.read_fd, &c, 1) != 1); in wait_for_parent()
/external/grpc-grpc/test/cpp/microbenchmarks/
Dbm_pollset.cc144 grpc_fd* fd = grpc_fd_create(wakeup_fd.read_fd, "xxx", false); in BM_PollAddFd()
225 grpc_fd* wakeup = grpc_fd_create(wakeup_fd.read_fd, "wakeup_read", false); in BM_SingleThreadPollOneFd()
246 wakeup_fd.read_fd = 0; in BM_SingleThreadPollOneFd()

123