From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [RFC PATCH V3 08/12] tools/tests: Clean-up tools/tests/xen-access Date: Mon, 2 Feb 2015 17:30:27 +0000 Message-ID: <1422898227.9323.1.camel@citrix.com> References: <1422567998-29995-1-git-send-email-tamas.lengyel@zentific.com> <1422567998-29995-9-git-send-email-tamas.lengyel@zentific.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1422567998-29995-9-git-send-email-tamas.lengyel@zentific.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tamas K Lengyel Cc: kevin.tian@intel.com, wei.liu2@citrix.com, jun.nakajima@intel.com, steve@zentific.com, stefano.stabellini@eu.citrix.com, tim@xen.org, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, eddie.dong@intel.com, andres@lagarcavilla.org, jbeulich@suse.com, rshriram@cs.ubc.ca, keir@xen.org, dgdegra@tycho.nsa.gov, yanghy@cn.fujitsu.com, rcojocaru@bitdefender.com List-Id: xen-devel@lists.xenproject.org On Thu, 2015-01-29 at 22:46 +0100, Tamas K Lengyel wrote: > The spin-lock implementation in the xen-access test program is implemented > in a fashion that is actually incomplete. The x86 assembly that guarantees that > the lock is held by only one thread lacks the "lock;" instruction. > > However, the spin-lock is not actually necessary in xen-access as it is not > multithreaded. The presence of the faulty implementation of the lock in a non- > mulithreaded environment is unnecessarily complicated for developers who are typo: "multithreaded" > trying to follow this code as a guide in implementing their own applications. > Thus, removing it from the code improves the clarity on the behavior of the > system. > > Also converting functions that always return 0 to return to void, and making > the teardown function actually return an error code on error. > > Signed-off-by: Tamas K Lengyel Acked-by: Ian Campbell