coroutine: implement coroutines using gthread
commit0ed64655bf5544950169c7efaca451bf3e045296
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Thu, 9 Jun 2011 17:41:06 +0000 (9 23:11 +0530)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Mon, 25 Jul 2011 17:09:10 +0000 (25 18:09 +0100)
treed7e1e62849398fe8371ad2e82c110ddf0eda884e
parent596a6cc70143cfac17558db555d2b93ddb8cb1c9
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>
Makefile.objs
configure
coroutine-gthread.c [new file with mode: 0644]