MCPcopy Create free account
hub / github.com/apache/trafficserver / EventNotify

Method EventNotify

src/tscore/EventNotify.cc:40–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38#endif
39
40EventNotify::EventNotify()
41{
42#if defined(HAVE_EVENTFD) && TS_USE_EPOLL == 1
43 int ret;
44 struct epoll_event ev;
45
46 m_event_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
47 ink_release_assert(m_event_fd != -1);
48
49 ev.events = EPOLLIN;
50 ev.data.fd = m_event_fd;
51
52 m_epoll_fd = epoll_create(1);
53 ink_release_assert(m_epoll_fd != -1);
54
55 ret = epoll_ctl(m_epoll_fd, EPOLL_CTL_ADD, m_event_fd, &ev);
56 ink_release_assert(ret != -1);
57#else
58 ink_cond_init(&m_cond);
59 ink_mutex_init(&m_mutex);
60#endif
61}
62
63void
64EventNotify::signal()

Callers

nothing calls this directly

Calls 2

ink_cond_initFunction · 0.85
ink_mutex_initFunction · 0.85

Tested by

no test coverage detected