DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matthew Hall <mhall@mhcomputing.net>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] rte_epoll_wait: allow EINTR to be passed to caller
Date: Sat, 13 Feb 2016 13:38:44 -0800	[thread overview]
Message-ID: <1455399524-3252-3-git-send-email-mhall@mhcomputing.net> (raw)
In-Reply-To: <1455399524-3252-1-git-send-email-mhall@mhcomputing.net>

Otherwise the caller will not be able to handle a return from a signal
handler.

Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
---
 lib/librte_eal/linuxapp/eal/eal_interrupts.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index c999cb6..4806ed1 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -1047,8 +1047,10 @@ rte_epoll_wait(int epfd, struct rte_epoll_event *events,
 			rc = eal_epoll_process_event(evs, rc, events);
 			break;
 		} else if (rc < 0) {
-			if (errno == EINTR)
-				continue;
+			if (errno == EINTR) {
+				/* timeout early (such as thread shutdown) */
+				break;
+			}
 			/* epoll_wait fail */
 			RTE_LOG(ERR, EAL, "epoll_wait returns with fail %s\n",
 				strerror(errno));
-- 
2.5.0

  parent reply	other threads:[~2016-02-13 21:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-13 21:38 [dpdk-dev] [PATCH 1/3] rte_interrupts: add rte_eal_intr_exit to shut down IRQ thread Matthew Hall
2016-02-13 21:38 ` [dpdk-dev] [PATCH 2/3] eal_interrupts: mark EAL interrupt thread as a daemon thread Matthew Hall
2016-02-13 21:38 ` Matthew Hall [this message]
2016-02-28 21:17 ` [dpdk-dev] [PATCH 1/3] rte_interrupts: add rte_eal_intr_exit to shut down IRQ thread Thomas Monjalon
2016-03-08 15:09   ` Thomas Monjalon
2016-03-09  9:05 ` Liang, Cunming
2016-03-17 22:55 ` [dpdk-dev] [dpdk-dev, " Matthew Hall
2016-03-21  7:58   ` Liang, Cunming
2016-03-22  7:39     ` Matthew Hall
2016-03-23  3:24       ` Liang, Cunming
2016-07-08 17:36         ` Thomas Monjalon
2016-07-11  4:07           ` Liang, Cunming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455399524-3252-3-git-send-email-mhall@mhcomputing.net \
    --to=mhall@mhcomputing.net \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).