]> git.proxmox.com Git - qemu.git/blobdiff - qemu-coroutine.h
PPC: Fix TLB invalidation bug within the PPC interrupt handler.
[qemu.git] / qemu-coroutine.h
index 8a55fe125ebce06ede28d6f2f8b85c1ac99525c0..34c15d41169ebb3aab061861c593ac60b4b58b51 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <stdbool.h>
 #include "qemu-queue.h"
+#include "qemu-timer.h"
 
 /**
  * Coroutines are a mechanism for stack switching and can be used for
@@ -199,4 +200,12 @@ void qemu_co_rwlock_wrlock(CoRwlock *lock);
  */
 void qemu_co_rwlock_unlock(CoRwlock *lock);
 
+/**
+ * Yield the coroutine for a given duration
+ *
+ * Note this function uses timers and hence only works when a main loop is in
+ * use.  See main-loop.h and do not use from qemu-tool programs.
+ */
+void coroutine_fn co_sleep_ns(QEMUClock *clock, int64_t ns);
+
 #endif /* QEMU_COROUTINE_H */