Received: from eggs.gnu.org ([2001:4830:134:3::10]:37315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay1Av-00005j-QY for qemu-devel@nongnu.org; Wed, 04 May 2016 14:05:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay1Aj-000572-PU for qemu-devel@nongnu.org; Wed, 04 May 2016 14:05:23 -0400 Received: from mail-ig0-x241.google.com ([2607:f8b0:4001:c05::241]:33427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay1Ai-0004xT-I9 for qemu-devel@nongnu.org; Wed, 04 May 2016 14:05:17 -0400 Received: by mail-ig0-x241.google.com with SMTP id rc4so6964970igc.0 for ; Wed, 04 May 2016 11:05:02 -0700 (PDT) Sender: Richard Henderson References: <1462369088-8650-1-git-send-email-sergey.fedorov@linaro.org> From: Richard Henderson Message-ID: <5855363d-6ba6-3c60-7023-88ca01a093cd@twiddle.net> Date: Wed, 4 May 2016 08:04:53 -1000 MIME-Version: 1.0 In-Reply-To: <1462369088-8650-1-git-send-email-sergey.fedorov@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC] cpu-exec: Restructure cpu_exec() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Fedorov , qemu-devel@nongnu.org Cc: Sergey Fedorov , Peter Crosthwaite , Paolo Bonzini On 05/04/2016 03:38 AM, Sergey Fedorov wrote: > From: Sergey Fedorov > > cpu_exec() was a huge function also sprinkled with some preprocessor > directives. It's hard to read and see the main loop crowded by all this > code. Restructure cpu_exec() by moving its conceptual parts into > separate static in-line functions. That makes it possible to see the > whole main loop at once, especially its sigsetjmp() handling part. > > Signed-off-by: Sergey Fedorov > Signed-off-by: Sergey Fedorov I agree that cpu_exec is a shocking horror. However, this patch is hard enough to read that it might be worth splitting. Is it easy enough to pull out each subroutine in a separate patch? r~