From: Tony Breeds Subject: [PATCH] Remove duplicated code in vcpu_pause/domain_pause Date: Wed, 30 Nov 2005 11:24:19 +1100 Message-ID: <20051130002419.GS25348@bakeyournoodle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen-Devel List-Id: xen-devel@lists.xenproject.org Hi All, Looking at xen/common/domain.c, I saw that domain_pause duplicates the code from VIP_pause. This patch eliminates the duplicate code and makes domain pause a mirror for the existing domain_unpause. Is there a reason not to do this? Signed-off-by: Tony Breeds ----------------- diff -r ccf76e51e7e6 xen/common/domain.c --- a/xen/common/domain.c Tue Nov 29 16:59:03 2005 +++ b/xen/common/domain.c Wed Nov 30 11:11:56 2005 @@ -293,11 +293,7 @@ struct vcpu *v; for_each_vcpu( d, v ) - { - BUG_ON(v == current); - atomic_inc(&v->pausecnt); - vcpu_sleep_sync(v); - } + vcpu_pause(v); sync_pagetable_state(d); } Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2006.linux.org.au/ Jan 23-28 2006 The Australian Linux Technical Conference!