[PATCH 4/5] add single_task_running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 external-module-compat-comm.h | 4 ++++
 external-module-compat.c      | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index d683c30..456ebf8 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -1453,6 +1453,10 @@ static inline void pci_set_dev_assigned(struct pci_dev *pdev)
 void *get_xsave_addr(struct xsave_struct *xsave, int feature);
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+bool single_task_running(void);
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
 #define trace_seq_buffer_ptr(p) ((p)->buffer + (p)->len)
 #endif
diff --git a/external-module-compat.c b/external-module-compat.c
index 347d20e..1d9a742 100644
--- a/external-module-compat.c
+++ b/external-module-compat.c
@@ -373,3 +373,11 @@ void *get_xsave_addr(struct xsave_struct *xsave, int feature)
 	return (u8 *)xsave + offset;
 }
 #endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+bool single_task_running(void)
+{
+	/* Not exactly the same... */
+	return !need_resched();
+}
+#endif
-- 
1.8.3.1


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux