From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlHba-0007Qr-BL for qemu-devel@nongnu.org; Thu, 12 Jan 2012 05:10:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlHbU-0000L7-Fr for qemu-devel@nongnu.org; Thu, 12 Jan 2012 05:09:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlHbU-0000L3-80 for qemu-devel@nongnu.org; Thu, 12 Jan 2012 05:09:52 -0500 Message-ID: <4F0EB237.9060602@redhat.com> Date: Thu, 12 Jan 2012 11:13:11 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1325858501-25741-1-git-send-email-stefanha@linux.vnet.ibm.com> <1325858501-25741-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1325858501-25741-2-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 01/15] coroutine: add co_sleep_ns() coroutine sleep function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Marcelo Tosatti , qemu-devel@nongnu.org, Luiz Capitulino Am 06.01.2012 15:01, schrieb Stefan Hajnoczi: > Signed-off-by: Stefan Hajnoczi > --- > Makefile.objs | 1 + > qemu-coroutine-sleep.c | 38 ++++++++++++++++++++++++++++++++++++++ > qemu-coroutine.h | 6 ++++++ > 3 files changed, 45 insertions(+), 0 deletions(-) > create mode 100644 qemu-coroutine-sleep.c > diff --git a/qemu-coroutine.h b/qemu-coroutine.h > index 8a55fe1..bae1ffe 100644 > --- a/qemu-coroutine.h > +++ b/qemu-coroutine.h > @@ -17,6 +17,7 @@ > > #include > #include "qemu-queue.h" > +#include "qemu-timer.h" > > /** > * Coroutines are a mechanism for stack switching and can be used for > @@ -199,4 +200,9 @@ void qemu_co_rwlock_wrlock(CoRwlock *lock); > */ > void qemu_co_rwlock_unlock(CoRwlock *lock); > > +/** > + * Yield the coroutine for a given duration > + */ > +void coroutine_fn co_sleep_ns(QEMUClock *clock, int64_t ns); > + > #endif /* QEMU_COROUTINE_H */ As you mentioned on IRC yesterday, timers don't work in the tools. There should probably be a warning in the comment (or a fix before this is merged) Kevin