From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxF1y-0003hp-9Y for qemu-devel@nongnu.org; Tue, 14 Feb 2012 04:50:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxF1s-0007rW-Ku for qemu-devel@nongnu.org; Tue, 14 Feb 2012 04:50:38 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:56577) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxF1s-0007rO-De for qemu-devel@nongnu.org; Tue, 14 Feb 2012 04:50:32 -0500 Received: by pbbro12 with SMTP id ro12so341511pbb.4 for ; Tue, 14 Feb 2012 01:50:31 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F3A2E61.9060706@redhat.com> Date: Tue, 14 Feb 2012 10:50:25 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1329144150-7720-1-git-send-email-abarcelo@ac.upc.edu> <1329144150-7720-2-git-send-email-abarcelo@ac.upc.edu> <20120214092439.GC5686@stefanha-thinkpad.localdomain> In-Reply-To: <20120214092439.GC5686@stefanha-thinkpad.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] coroutine: adding sigaltstack method (.c source) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Alex Barcelo , qemu-devel@nongnu.org On 02/14/2012 10:24 AM, Stefan Hajnoczi wrote: > setjmp() followed by return is usually bad. We're relying on the fact > that the return code path here does not clobber local variables 'self' > and 'co'. Can't we longjmp out back to the coroutine_new() function > instead? http://www.gnu.org/software/pth/rse-pmt.ps covers this. Basically, this turned out to be more portable than longjmp from a signal handler. Paolo