summaryrefslogtreecommitdiff
path: root/Makefile.objs
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-06-09 23:11:06 +0530
committerKevin Wolf <kwolf@redhat.com>2011-08-01 12:14:09 +0200
commit956dda18934dc64fc42616882f2d2725056e1aed (patch)
tree288ec137a15c408a417e3bf696b548a013f0965c /Makefile.objs
parent4db95faefc67dd518d82d4ddfd28d4385f505d71 (diff)
downloadqemu-956dda18934dc64fc42616882f2d2725056e1aed.tar.gz
qemu-956dda18934dc64fc42616882f2d2725056e1aed.tar.bz2
qemu-956dda18934dc64fc42616882f2d2725056e1aed.zip
coroutine: implement coroutines using gthread
On platforms that don't support makecontext(3) use gthread based coroutine implementation. Darwin has makecontext(3) but getcontext(3) is stubbed out to return ENOTSUP. Andreas Färber <andreas.faerber@web.de> debugged this and contributed the ./configure test which solves the issue for Darwin/ppc64 (and ppc) v10.5. [Original patch by Aneesh, made consistent with coroutine-ucontext.c and switched to GStaticPrivate by Stefan. Tested on Linux and OpenBSD.] Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.objs')
-rw-r--r--Makefile.objs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.objs b/Makefile.objs
index 28e1762463..5679e1fa06 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -13,7 +13,11 @@ oslib-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o
#######################################################################
# coroutines
coroutine-obj-y = qemu-coroutine.o
+ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
+else
+coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
+endif
coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
#######################################################################