From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay252-0004bm-8B for qemu-devel@nongnu.org; Wed, 04 May 2016 15:03:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay24q-0004Xr-M6 for qemu-devel@nongnu.org; Wed, 04 May 2016 15:03:22 -0400 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:34998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay24p-0004RH-BV for qemu-devel@nongnu.org; Wed, 04 May 2016 15:03:16 -0400 Received: by mail-lf0-x231.google.com with SMTP id j8so71262189lfd.2 for ; Wed, 04 May 2016 12:03:00 -0700 (PDT) References: <1462369088-8650-1-git-send-email-sergey.fedorov@linaro.org> <5855363d-6ba6-3c60-7023-88ca01a093cd@twiddle.net> From: Sergey Fedorov Message-ID: <572A4759.8050304@gmail.com> Date: Wed, 4 May 2016 22:02:49 +0300 MIME-Version: 1.0 In-Reply-To: <5855363d-6ba6-3c60-7023-88ca01a093cd@twiddle.net> Content-Type: text/plain; charset=windows-1252 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: Richard Henderson , Sergey Fedorov , qemu-devel@nongnu.org Cc: Peter Crosthwaite , Paolo Bonzini On 04/05/16 21:04, Richard Henderson wrote: > 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? Sure, it's easy. I just wanted to check that this is a right approach and after this patch applied cpu_exec() is in right shape. I'll prepare a split patch series later. Kind regards, Sergey