| 54 | public: |
| 55 | C_handle_notify(EventCenter *c, CephContext *cc): center(c), cct(cc) {} |
| 56 | void do_request(uint64_t fd_or_id) override { |
| 57 | #ifdef __linux__ |
| 58 | eventfd_t value; |
| 59 | std::ignore = read(fd_or_id, &value, sizeof(value)); |
| 60 | #else |
| 61 | char c[256]; |
| 62 | int r = 0; |
| 63 | do { |
| 64 | #ifdef _WIN32 |
| 65 | r = recv(fd_or_id, c, sizeof(c), 0); |
| 66 | #else |
| 67 | r = read(fd_or_id, c, sizeof(c)); |
| 68 | #endif |
| 69 | if (r < 0) { |
| 70 | if (ceph_sock_errno() != EAGAIN) |
| 71 | ldout(cct, 1) << __func__ << " read notify pipe failed: " << cpp_strerror(ceph_sock_errno()) << dendl; |
| 72 | } |
| 73 | } while (r > 0); |
| 74 | #endif |
| 75 | } |
| 76 | }; |
| 77 | |
| 78 | #undef dout_prefix |
no test coverage detected