From owner-freebsd-current@FreeBSD.ORG Tue Dec 20 11:25:40 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 9122416A41F for ; Tue, 20 Dec 2005 11:25:40 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FAC443D49 for ; Tue, 20 Dec 2005 11:25:40 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id jBKBPcUn033285; Tue, 20 Dec 2005 03:25:38 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id jBKBPcws033284; Tue, 20 Dec 2005 03:25:38 -0800 (PST) (envelope-from rizzo) Date: Tue, 20 Dec 2005 03:25:38 -0800 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20051220032538.A33093@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Cc: Subject: 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 11:25:40 -0000 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. cheers luigi