MCPcopy Create free account
hub / github.com/acl-dev/acl / fiber_read

Function fiber_read

lib_fiber/unit_test/io/poll.cpp:31–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31static bool fiber_read(int fd, long long& out)
32{
33 if (read_wait(fd, 2) <= 0) {
34 printf("read_wait error for fd=%d\r\n", fd);
35 return false;
36 }
37
38 long long n;
39 ssize_t ret = read(fd, &n, sizeof(n));
40 if (ret != sizeof(n)) {
41 printf("read from eventfd %d error %s\r\n",
42 fd, acl::last_serror());
43 return false;
44 } else {
45 out = n;
46 return true;
47 }
48}
49
50#endif // __linux__
51

Callers 1

poll.cppFile · 0.70

Calls 3

read_waitFunction · 0.70
readFunction · 0.50
last_serrorFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…