This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: swapcontext() slow


21.01.2016 20:47, Mike Frysinger ÐÐÑÐÑ:
> On 21 Jan 2016 12:24, Godmar Back wrote:
>> On Thu, Jan 21, 2016 at 11:40 AM, Mike Frysinger <vapier@gentoo.org> wrote:
>>> these functions are deprecated/dead -- they no longer exist in the latest
>>> POSIX specification.  the preference would be to stop using them.  i think
>>> we might consider dropping them in a future glibc version.
>>
>> Interesting - what's replacing them, if anything?
>>
>> Will there be any support infrastructure for portable user-level threading?
> 
> use pthreads.  there are usually implementations for whatever OS you
> want.  at least more portable than the context functions.
Have you seen the coroutine implementation on pthreads?
This is usually a horrible "emulation" with a bunch of
synchronization primitives. pthreads are pre-emptive, and
emulating the cooperative execution with them is dirty and
the resulting code is very slow, compared to the straight-forward
stack switch+jump.
Could you please point me to an adequate implementation?
If there is none, there is no way to even think about removing
this API.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]