MCPcopy Create free account
hub / github.com/ceph/ceph / close

Method close

src/msg/async/dpdk/UserspaceEvent.cc:74–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void UserspaceEventManager::close(int fd)
75{
76 ldout(cct, 20) << __func__ << " fd=" << fd << dendl;
77 if ((size_t)fd >= fds.size())
78 return ;
79
80 std::optional<UserspaceFDImpl> &impl = fds[fd];
81 if (!impl)
82 return ;
83
84 if (fd == max_fd)
85 --max_fd;
86 else
87 unused_fds.push_back(fd);
88
89 if (impl->activating_mask) {
90 if (waiting_fds[max_wait_idx] == fd) {
91 ceph_assert(impl->waiting_idx == max_wait_idx);
92 --max_wait_idx;
93 }
94 waiting_fds[impl->waiting_idx] = -1;
95 }
96 impl.reset();
97}
98
99int UserspaceEventManager::poll(int *events, int *masks, int num_events, struct timeval *tp)
100{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
push_backMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected