From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: mdroth <mdroth@linux.vnet.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Liu Ping Fan <qemulist@gmail.com>
Subject: Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib
Date: Tue, 19 Mar 2013 11:34:41 +0100 [thread overview]
Message-ID: <51483F41.5000800@redhat.com> (raw)
In-Reply-To: <CAFEAcA9vSWXhin9v9kAVoXczzLnM53BeuNegzn8Uj++no-0cqA@mail.gmail.com>
Il 19/03/2013 11:12, Peter Maydell ha scritto:
> On 19 March 2013 09:30, Markus Armbruster <armbru@redhat.com> 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
>
next prev parent reply other threads:[~2013-03-19 10:44 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 5:59 [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib Liu Ping Fan
2013-03-13 5:59 ` [Qemu-devel] [RFC PATCH 1/2] net: port tap " Liu Ping Fan
2013-03-13 5:59 ` [Qemu-devel] [RFC PATCH 2/2] net: port hub " Liu Ping Fan
2013-03-13 10:58 ` [Qemu-devel] [RFC PATCH 0/2] port network layer " Paolo Bonzini
2013-03-13 12:34 ` Anthony Liguori
2013-03-13 16:21 ` Paolo Bonzini
2013-03-13 17:06 ` mdroth
2013-03-13 17:31 ` Paolo Bonzini
2013-03-13 17:52 ` Michael S. Tsirkin
2013-03-13 18:09 ` Anthony Liguori
2013-03-13 17:23 ` Anthony Liguori
2013-03-13 17:35 ` Paolo Bonzini
2013-03-13 17:52 ` Anthony Liguori
2013-03-14 9:29 ` Stefan Hajnoczi
2013-03-14 9:53 ` Paolo Bonzini
2013-03-13 17:58 ` Anthony Liguori
2013-03-13 18:08 ` Paolo Bonzini
2013-03-13 18:51 ` Anthony Liguori
2013-03-14 10:04 ` Peter Maydell
2013-03-14 10:53 ` Paolo Bonzini
2013-03-14 11:00 ` Peter Maydell
2013-03-14 11:04 ` Paolo Bonzini
2013-03-14 11:26 ` Peter Maydell
2013-03-15 9:13 ` Stefan Hajnoczi
2013-03-19 9:30 ` Markus Armbruster
2013-03-19 10:12 ` Peter Maydell
2013-03-19 10:34 ` Paolo Bonzini [this message]
2013-03-19 10:38 ` Peter Maydell
2013-03-19 10:45 ` Paolo Bonzini
2013-03-14 14:08 ` liu ping fan
2013-03-14 14:18 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51483F41.5000800@redhat.com \
--to=pbonzini@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemulist@gmail.com \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.