eal/linux: add function to allow interruptible epoll
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 3 Sep 2020 23:28:22 +0000 (16:28 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 19 Oct 2020 10:17:25 +0000 (12:17 +0200)
commitbb548625c6154f7dca48e249774233fc691e70cb
treef3eb6653e3753d819acfcbced9a0d35ee9675e1f
parent0e8704a453e5295ff9f498c6cdab7f829410ad88
eal/linux: add function to allow interruptible epoll

The existing definition of rte_epoll_wait retries if interrupted
by a signal. This behavior makes it hard to use rte_epoll_wait
for applications that want to use signals do do things like
exit polling loop and shutdown.

Since changing existing semantic might break applications, add
a new rte_epoll_wait_interruptible() function that does the
same thing as rte_epoll_wait but will return -1 and errno of EINTR
if it receives a signal.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Harman Kalra <hkalra@marvell.com>
lib/librte_eal/freebsd/eal_interrupts.c
lib/librte_eal/include/rte_eal_interrupts.h
lib/librte_eal/linux/eal_interrupts.c
lib/librte_eal/rte_eal_version.map