From: Ian Jackson Subject: Re: [PATCH 03/20] libxl: Fix eventloop_iteration over-locking Date: Mon, 19 Mar 2012 17:48:21 +0000 Message-ID: <20327.29029.319573.228826@mariner.uk.xensource.com> References: <1331915215-10477-1-git-send-email-ian.jackson@eu.citrix.com> <1331915215-10477-4-git-send-email-ian.jackson@eu.citrix.com> <1332178278.9223.142.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1332178278.9223.142.camel@zakaz.uk.xensource.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: Ian Campbell Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [Xen-devel] [PATCH 03/20] libxl: Fix eventloop_iteration over-locking"): > A comment in eventloop_iteration along the lines "no need to lock, we > must be called with lock held once" might be nice to prevent future > re-occurences of the same error. You don't see it in this patch, but there's something along these lines already. Let me add some more context: > > @@ -1058,8 +1058,6 @@ static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) { static int eventloop_iteration(libxl__egc *egc, libxl__poller *poller) { /* The CTX must be locked EXACTLY ONCE so that this function * can unlock it when it polls. */ EGC_GC; > > int rc; > > struct timeval now; > > > > - CTX_LOCK; > > - Ian.