Boost logo

Boost Users :

Subject: [Boost-users] [coroutine] Assembler snippet for linux x86_64
From: Pavel Shevaev (pacha.shevaev_at_[hidden])
Date: 2009-07-21 06:02:34


Hi folks,

First of all I'd like to thank Giovanni P. Deretta for the brilliant
idea and implementation of courotines [1]. Unfortunately, coroutines
haven't been reviewed and included into the official boost repository
yet but I believe it's just a matter of time.

I downloaded the latest version "boost-coroutine-2009-04-30.tar.gz"
from the boost vault[2] and it seems to build/run just fine on linux
x86.
However trying to build it on x86_64 gave me a compile time error -
"This file is for x86 CPUs only" in swapcontext.cpp, since there is a
#if !defined(i386) guard which produces this error.

I was naive and tried to change "#if !defined(i386)" to "if
!defined(i386) && !defined(__x86_64__)" in hope it would "just work"
for x86_64...well, it didn't ;)

I'm not that good in assembler(I have only basic knowledge), maybe
someone stumbled upon the same problem and has a working patch for
x86_64? Or maybe someone can give some pointers on how to make
couroutines x86_64 compatible? IMHO, it shouldn't be very hard and I
can try to do it myself, I just don't know where to start :)

Thanks a lot in advance.

[1] http://www.crystalclearsoftware.com/soc/coroutine/index.html
[2] http://www.boostpro.com/vault/index.php?direction=0&order=&directory=Concurrent%20Programming&

-- 
Best regards, Pavel

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net