From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPuXM-0003u7-CH for qemu-devel@nongnu.org; Tue, 18 Mar 2014 09:58:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPuXH-0000G7-Uv for qemu-devel@nongnu.org; Tue, 18 Mar 2014 09:58:36 -0400 Received: from mail-oa0-f50.google.com ([209.85.219.50]:44522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPuXH-0000G1-QX for qemu-devel@nongnu.org; Tue, 18 Mar 2014 09:58:31 -0400 Received: by mail-oa0-f50.google.com with SMTP id i7so7169103oag.9 for ; Tue, 18 Mar 2014 06:58:31 -0700 (PDT) Date: Tue, 18 Mar 2014 13:57:17 +0000 From: Leandro Dorileo Message-ID: <20140318135717.GA24502@dorilex> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] How to understand the coroutine context? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Le Tan Cc: qemu-devel@nongnu.org Hi, On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote: > Hi, I am diving into the source code of qemu. I see the word > "coroutine" appears in so many places. I can't figure out what it > means. So, please, can anyone help me, telling me the mechanism or > semantic of "coroutine"? Thanks! If you want to understand the coroutine technique itself take a look at this page[1], the're two references that may be helpfull. A friend of mine has described[2] his view on implementing coroutine, this may be helpfull as well. [1] - http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html [2] - http://tia.mat.br/blog/html/2012/09/29/asynchronous_i_o_in_c_with_coroutines.html Regards... -- Leandro Dorileo