All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Semel <semelpaul@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: wipawel@amazon.de, Paul Semel <phentex@amazon.de>,
	roger.pau@citrix.com, andrew.cooper3@citrix.com
Subject: [PATCH v3 5/7] add spin_sleep function to time manager
Date: Mon,  9 Apr 2018 16:35:41 +0200	[thread overview]
Message-ID: <20180409143543.4568-5-semelpaul@gmail.com> (raw)
In-Reply-To: <20180409143543.4568-1-semelpaul@gmail.com>

From: Paul Semel <phentex@amazon.de>

this function uses nspin_sleep to spin sleep for t seconds

Signed-off-by: Paul Semel <phentex@amazon.de>
---
 common/time.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/time.c b/common/time.c
index 4770b9a..e744ab1 100644
--- a/common/time.c
+++ b/common/time.c
@@ -151,6 +151,12 @@ static inline void nspin_sleep(uint64_t t)
         asm volatile ("pause");
 }
 
+static inline void spin_sleep(uint64_t t)
+{
+    uint64_t nsec = SEC_TO_NSEC(t);
+    nspin_sleep(nsec);
+}
+
 /*
  * Local variables:
  * mode: C
-- 
2.16.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-04-09 14:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 14:35 [PATCH v3 1/7] introduce time managment in xtf Paul Semel
2018-04-09 14:35 ` [PATCH v3 2/7] add current_time function to time manager Paul Semel
2018-04-09 14:35 ` [PATCH v3 3/7] add gettimeofday function to time managment Paul Semel
2018-04-09 14:35 ` [PATCH v3 4/7] add nspin_sleep function to time manager Paul Semel
2018-04-09 14:35 ` Paul Semel [this message]
2018-04-09 14:35 ` [PATCH v3 6/7] add mspin_sleep " Paul Semel
2018-04-09 14:35 ` [PATCH v3 7/7] add sleep, msleep and NOW() macros " Paul Semel
2018-04-09 14:35 ` [PATCH v3 1/7] introduce time managment in xtf Roger Pau Monné
2018-04-09 14:45   ` Andrew Cooper
2018-04-09 15:12   ` Paul Semel
2018-04-10  8:08     ` Roger Pau Monné
2018-04-10  9:47       ` Paul Semel
2018-04-10 10:05         ` Roger Pau Monné
2018-04-10 10:32           ` Paul Semel
2018-04-10 10:36             ` Roger Pau Monné
2018-04-10 10:39               ` Paul Semel

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=20180409143543.4568-5-semelpaul@gmail.com \
    --to=semelpaul@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=phentex@amazon.de \
    --cc=roger.pau@citrix.com \
    --cc=wipawel@amazon.de \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.