From owner-p4-projects@FreeBSD.ORG Mon May 30 09:48:30 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 09AEA1065676; Mon, 30 May 2011 09:48:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFD2B106566B; Mon, 30 May 2011 09:48:29 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.c2i.net [212.247.154.130]) by mx1.freebsd.org (Postfix) with ESMTP id 1CFAA8FC15; Mon, 30 May 2011 09:48:28 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=upTJuTb3ngPPUUVVSPoyO7jwIWz3rzPtkQxI490l6Ks= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=Da1jdKfs6SYA:10 a=WQU8e4WWZSUA:10 a=N659UExz7-8A:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=PsjQNPs2quoCitkjTdsA:9 a=pILNOxqGKmIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 131916958; Mon, 30 May 2011 11:38:24 +0200 From: Hans Petter Selasky To: Ilya Putsikau Date: Mon, 30 May 2011 11:37:06 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201105291108.p4TB8TNI081384@skunkworks.freebsd.org> In-Reply-To: <201105291108.p4TB8TNI081384@skunkworks.freebsd.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-1?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-1?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201105301137.06276.hselasky@c2i.net> Cc: Perforce Change Reviews Subject: Re: PERFORCE change 193904 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2011 09:48:30 -0000 On Sunday 29 May 2011 13:08:29 Ilya Putsikau wrote: > - mtx_lock(&data->ticket_mtx); > - data->dataflag |= FSESS_INITED; > - wakeup(&data->ticketer); > - mtx_unlock(&data->ticket_mtx); > + mtx_lock(&data->ticket_mtx); > + data->dataflag |= FSESS_INITED; > + wakeup(&data->ticketer); > + mtx_unlock(&data->ticket_mtx); Hi, It is maybe an idea to make macros for frequencly used locking. TICKET_LOCK(&data); TICKET_UNLOCK(&data); --HPS