From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHtXm-0006vs-9o for qemu-devel@nongnu.org; Tue, 19 Mar 2013 06:13:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHtXk-0006st-N9 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 06:13:22 -0400 Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:65013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHtXk-0006sg-G3 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 06:13:20 -0400 Received: by mail-la0-f44.google.com with SMTP id eb20so541508lab.3 for ; Tue, 19 Mar 2013 03:13:19 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87r4jbn3d1.fsf@blackfin.pond.sub.org> References: <1363154346-14827-1-git-send-email-qemulist@gmail.com> <51405BEA.6080109@redhat.com> <87hakfiild.fsf@codemonkey.ws> <87r4jbn3d1.fsf@blackfin.pond.sub.org> From: Peter Maydell Date: Tue, 19 Mar 2013 10:12:59 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: mdroth , "Michael S. Tsirkin" , Stefan Hajnoczi , qemu-devel@nongnu.org, Liu Ping Fan , Anthony Liguori , Paolo Bonzini On 19 March 2013 09:30, Markus Armbruster 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 :-) > 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