From owner-cvs-all@FreeBSD.ORG Fri Jan 18 14:30:01 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70ED816A629; Fri, 18 Jan 2008 14:30:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 2041013C4DD; Fri, 18 Jan 2008 14:30:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 289501A4D84; Fri, 18 Jan 2008 06:26:31 -0800 (PST) From: John Baldwin To: "Attilio Rao" Date: Fri, 18 Jan 2008 09:29:44 -0500 User-Agent: KMail/1.9.7 References: <200801181300.m0ID0SMi041767@repoman.freebsd.org> <3bbf2fe10801180534y7f97f39meb0b12624e0b919a@mail.gmail.com> In-Reply-To: <3bbf2fe10801180534y7f97f39meb0b12624e0b919a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801180929.45123.jhb@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, David Xu , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_time.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2008 14:30:01 -0000 On Friday 18 January 2008 08:34:57 am Attilio Rao wrote: > 2008/1/18, David Xu : > > davidxu 2008-01-18 13:00:28 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/kern kern_time.c > > Log: > > Make sure reading td_runtime in critical section since thread may be > > preempted and td_runtime will be modified. > > If you don't need the operation to be atomical with other operations > inside the critical path (and I don't expect so) this change is > pointless as our reading are always atomic. Not on 32-bit archs like i386. They may do two 32-bit reads and you could have problems if the lower 32 wraps in between the reads. -- John Baldwin