dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Robert Sanford <rsanford2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: dev-VfR2kkLFssw@public.gmane.org
Subject: [PATCH v2 1/3] timer: pause in rte_timer_reset_sync
Date: Tue, 24 Feb 2015 23:09:47 -0500	[thread overview]
Message-ID: <1424837389-56276-2-git-send-email-rsanford2@gmail.com> (raw)
In-Reply-To: <1422996127-64370-1-git-send-email-rsanford2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

In rte_timer_reset_sync(), insert rte_pause() into loop that waits
for rte_timer_reset() to succeed.

Signed-off-by: Robert Sanford <rsanford2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

---
lib/librte_timer/rte_timer.c |    3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index 269a992..dae76cc 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -437,7 +437,8 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks,
 		     rte_timer_cb_t fct, void *arg)
 {
 	while (rte_timer_reset(tim, ticks, type, tim_lcore,
-			       fct, arg) != 0);
+			       fct, arg) != 0)
+		rte_pause();
 }
 
 /* Stop the timer associated with the timer handle tim */
-- 
1.7.1

  parent reply	other threads:[~2015-02-25  4:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 20:42 [RFC PATCH] rte_timer: Fix rte_timer_reset return value rsanford2-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <1422996127-64370-1-git-send-email-rsanford2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-06 11:10   ` Olivier MATZ
     [not found]     ` <54D4A116.1090402-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-02-06 17:26       ` Robert Sanford
     [not found]         ` <CA+cr1coAamT1OkL-Ts6gWe+N_fuJf-uQunJeTqUg_ngDGM1Vfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-08 10:53           ` Olivier MATZ
2015-02-25  4:09   ` [PATCH v2 0/3] timer: fix rte_timer_reset Robert Sanford
     [not found]     ` <1424837389-56276-1-git-send-email-rsanford2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-25  8:58       ` Olivier MATZ
     [not found]         ` <54ED8EC1.3030108-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-02-25  9:46           ` Thomas Monjalon
2015-02-25 11:02             ` Robert Sanford
     [not found]               ` <CA+cr1crDcQcdtJc9zaHbCL9DG40aV3a3ZF_fnNBx2h3WZP-quQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-25 11:09                 ` Thomas Monjalon
2015-02-25 11:16                 ` Bruce Richardson
2015-02-25 13:34                   ` Robert Sanford
2015-02-25  4:09   ` Robert Sanford [this message]
2015-02-25  4:09   ` [PATCH v2 2/3] timer: fix stress test on multiple runs Robert Sanford
2015-02-25  4:09   ` [PATCH v2 3/3] timer: fix rte_timer_reset return value Robert Sanford

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=1424837389-56276-2-git-send-email-rsanford2@gmail.com \
    --to=rsanford2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.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).