dataplane: add event loop
Outside the safety of the global mutex we need to poll on file
descriptors. I found epoll(2) is a convenient way to do that, although
other options could replace this module in the future (such as an
AioContext-based loop or glib's GMainLoop).
One important feature of this small event loop implementation is that
the loop can be terminated in a thread-safe way. This allows QEMU to
stop the data plane thread cleanly.
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
Showing
hw/dataplane/event-poll.c
0 → 100644
hw/dataplane/event-poll.h
0 → 100644
想要评论请 注册 或 登录