From owner-freebsd-current@FreeBSD.ORG Tue Dec 20 19:04:10 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DBA216A41F for ; Tue, 20 Dec 2005 19:04:10 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id B31D943D64 for ; Tue, 20 Dec 2005 19:04:09 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.17.229]) ([10.251.17.229]) by a50.ironport.com with ESMTP; 20 Dec 2005 11:04:07 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <43A855A5.6070809@elischer.org> Date: Tue, 20 Dec 2005 11:04:05 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Luigi Rizzo References: <20051220032538.A33093@xorpc.icir.org> In-Reply-To: <20051220032538.A33093@xorpc.icir.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: td->td_critnest manipulations do not use atomic_add_int ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2005 19:04:10 -0000 Luigi Rizzo wrote: >as in the subject... i see that td->td_critnest (used to determine >whether a thread can be preempted or not) is manipulated using >plain ++ or -- instruction instead of the atomic_add_int(). > >I wonder if declaring it as volatile and possibly its >usage patterns are enough to make the two things equivalent >on all architectures. > > is td ever != curthread? >cheers >luigi >_______________________________________________ >freebsd-current@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-current >To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > >