From owner-svn-src-head@FreeBSD.ORG Wed Feb 22 23:42:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A9071065674; Wed, 22 Feb 2012 23:42:58 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id D905B8FC08; Wed, 22 Feb 2012 23:42:57 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 04DDF36FA57; Thu, 23 Feb 2012 00:42:55 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id DED7C28468; Thu, 23 Feb 2012 00:42:54 +0100 (CET) Date: Thu, 23 Feb 2012 00:42:54 +0100 From: Jilles Tjoelker To: David Xu Message-ID: <20120222234254.GC95122@stack.nl> References: <201202220322.q1M3MoFE032330@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201202220322.q1M3MoFE032330@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231989 - in head: lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 23:42:58 -0000 On Wed, Feb 22, 2012 at 03:22:50AM +0000, David Xu wrote: > Author: davidxu > Date: Wed Feb 22 03:22:49 2012 > New Revision: 231989 > URL: http://svn.freebsd.org/changeset/base/231989 > Log: > Use unused fourth argument of umtx_op to pass flags to kernel for operation > UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower > 16bits is used to pass flags. The change saves a clock_gettime() syscall > from libthr. > Modified: > head/lib/libthr/thread/thr_umtx.c > head/sys/kern/kern_umtx.c > head/sys/sys/umtx.h > > Modified: head/lib/libthr/thread/thr_umtx.c > ============================================================================== > --- head/lib/libthr/thread/thr_umtx.c Wed Feb 22 01:50:13 2012 (r231988) > +++ head/lib/libthr/thread/thr_umtx.c Wed Feb 22 03:22:49 2012 (r231989) > @@ -200,20 +200,10 @@ int > + abstime != NULL ? (void *)(uintptr_t)((clockid << 16) | UMTX_WAIT_ABSTIME) : 0, Please check that this shift does not lose any information (i.e., clockid >= 0 && clockid <= 0xFFFF) before doing it. Implementing clock_getcpuclockid() will require clockids greater than 65535 because such clockids contain a process id. -- Jilles Tjoelker