Boost logo

Boost Users :

Subject: Re: [Boost-users] [coroutine] Assembler snippet for linux x86_64
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-07-21 09:53:14


> > 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.
>
> Sorry, folks, I'm replying to myself - the problem was gone once I
> excluded swapcontext.cpp from my custom build process. Looks like
> coroutine cleverly fallbacks to POSIX makecontext and friends for
> anything non-linux-x86. Anyway, I believe it would be great to support
> linux x86_64 with a faster assembler implementation of swapcontext.
> I'll play around with the code and report back(if I'm lucky :) )

See attached the version of Linux64Bit support we're using in house. You'll
need to do a bit of preprocessor fiddling to integrate that into your
distribution, but that shouldn't be too difficult (I'm attaching my
default_context_impl.hpp as a guideline).

HTH
Regards Hartmut





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