kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #22814
Re: [RFC PATCH] No more boost::context
-
To:
Chris Pavlina <pavlina.chris@xxxxxxxxx>
-
From:
Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>
-
Date:
Thu, 21 Jan 2016 15:21:41 +0100
-
Authentication-results:
spf=pass (sender IP is 188.184.36.50) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
Cc:
Kicad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<20160121140359.GA11760@turnip.localdomain>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:23
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
On 21.01.2016 15:03, Chris Pavlina wrote:
> Hm, is this really something we want to get into? Nice to remove the
> dependency, but when something breaks in the future, do we have any/many
> developers who can support x86 assembly code?
>
Concerning the support: I can do that, but there is absolutely nothing
to support. This library does just context switching and nothing else
and it contains no original code. In fact, it's generated from
boost::context by a script. It will never need an update unless:
- We decide to support a completely new HW platform. Porting anything
that boost::context already supports is trivial. I didn't include
MIPS/PPC/Sparc/ARM platform files because I couldn't test if they work.
- We change the compiler to something else than Clang/GCC.
- Intel changes the instruction set of their CPUs.
> I really think that if we're going to have to support this, it should be
> something conceptually simpler, like an emulation of coroutines using a
> set of threads and locks.
Have a look at the discussion between Lorenzo, Kristian and Torsten.
Emulating coroutines with threads can only bring more problems.
Cheers,
Tom
>
> On Thu, Jan 21, 2016 at 02:42:05PM +0100, Tomasz Wlostowski wrote:
>> Hi,
>>
>> This patch replaces boost::context with a small library called
>> libcontext (derived from boost::context sources). It drops the
>> dependency on boost for the cost of one additional header file and cpp
>> file (taking inspiration from ClipperLib).
>>
>> I've tested the new context switching code on Linux, OSX (El Capitan) &
>> Windows (all OS 32-bit and 64-bit Intel). Supported compilers are GCC
>> and Clang.
>>
>> Let me know if Kicad builds and works correctly on your platforms...
>>
>> Cheers,
>> Tom
Follow ups
References