Hello Sebastian,

> On 26 Jul 2019, at 10:19, Florian Weimer <fwei...@redhat.com> wrote:
> 
> * Sebastian Huber:

>> On 06/06/2018 08:33, Florian Weimer wrote:
>>> On 06/04/2018 07:36 PM, Jonathan Wakely wrote:
>>>> On 4 June 2018 at 18:32, Marco Ippolito wrote:
>>>>> Hi all,
>>>>> 
>>>>> clang and VS2017 already support the Coroutines TS extensions.
>>>>> For which gcc release is going to be foreseen the support for the
>>>>> Coroutines TS extension?
>>>> 
>>>> This has been discussed recently, search the mailing list.
>>>> 
>>>> It will be supported after somebody implements it.
>>> 
>>> If it is in fact implementable on top of the GNU ABI.  Some variants
>>> of coroutines are not.
>> 
>> it seems C++20 will contain coroutines. Are there already some plans
>> to support them in GCC?
> 
> There is <http://gcc.gnu.org/wiki/cxx-coroutines>.  Iain Sandoe is
> working on it.

The hope is to have enough of the implementation complete to post before
the end of stage1, and for potential inclusion in GCC10 (if there’s enough
review/amendment time).  Still plenty to do before then tho!

It’s also intended to present the background and status at the Cauldron.

>> I ask this so that I can plan my work to
>> support it for RTEMS. For example, are there plans to build them on
>> top of ucontext?
> 
> C++ coroutines are stackless.  I don't think any new low-level run-time
> support will be needed.

correct, C++20 coroutines and threading mechanisms are orthogonal 
facilities; one can use (IS C++20) coroutines on top of a threaded system
or in a single-threaded environment.

Two places I see them as being a go-to facility in embedded systems are:
 * co-operative multi-tasking UIs on single-threaded platforms.
 * async I/O completion by continuations, rather than callbacks.

Of course, there are likely to be many of the shared cases with non-embedded
- there can be quite surprising implementations where coros can be used to 
hide memory access latency, for example.

cheers
Iain


Reply via email to