[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib |
Date: |
Tue, 19 Mar 2013 11:34:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 |
Il 19/03/2013 11:12, Peter Maydell ha scritto:
> On 19 March 2013 09:30, Markus Armbruster <address@hidden> wrote:
>> Coroutines are a perfectly pedestrian control flow construct.
>
> In some languages, sure. Not in C, and we're writing C.
>
>> Coroutines fit about as well with C as threads, namely not really.
>
> Threads are supported by the language runtime provided on all
> the systems we support, which is why they are reasonably usable.
> When you've persuaded glibc, MacOSX libc and Windows to implement
> coroutines please come back and let me know :-)
Windows supports them (it calls them fibers) and glibc does on many
architectures (all but ARM, basically).
Paolo
>> If portable coroutines in C really was an intractable problem, the
>> solution could not be "no more coroutines, please", only "no coroutines,
>> period". As long as we have to pay the price for coroutines anyway, I
>> can't see why we should deny ourselves the benefits.
>
> I'd like to see coroutines gone completely. The first step is not
> to let them get used more than they are already.
>
>> C programs have been doing coroutines since forever, using either hand
>> coded assembly language stack switching, sigaltstack() trickery,
>> ucontext(), w32 fibers, or some coroutine library built on top of these.
>
> ...and there's a wide range of really nasty options because none
> of them are actually decent solutions to the problem.
>
> -- PMM
>
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, (continued)
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Peter Maydell, 2013/03/14
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Paolo Bonzini, 2013/03/14
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Peter Maydell, 2013/03/14
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Paolo Bonzini, 2013/03/14
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Peter Maydell, 2013/03/14
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Stefan Hajnoczi, 2013/03/15
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Markus Armbruster, 2013/03/19
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Peter Maydell, 2013/03/19
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib,
Paolo Bonzini <=
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Peter Maydell, 2013/03/19
- Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, Paolo Bonzini, 2013/03/19
Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib, liu ping fan, 2013/03/14