From owner-cvs-src-old@FreeBSD.ORG Wed Dec 22 05:04:14 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B55121065679 for ; Wed, 22 Dec 2010 05:04:14 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A09DD8FC16 for ; Wed, 22 Dec 2010 05:04:14 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oBM54E0x046090 for ; Wed, 22 Dec 2010 05:04:14 GMT (envelope-from davidxu@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oBM54E8X046089 for cvs-src-old@freebsd.org; Wed, 22 Dec 2010 05:04:14 GMT (envelope-from davidxu@repoman.freebsd.org) Message-Id: <201012220504.oBM54E8X046089@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to davidxu@repoman.freebsd.org using -f From: David Xu Date: Wed, 22 Dec 2010 05:01:52 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libthr/thread Makefile.inc thr_cond.c thr_init.c thr_kern.c thr_list.c thr_mutex.c thr_private.h thr_umtx.c thr_umtx.h src/sys/kern kern_umtx.c src/sys/sys _umtx.h umtx.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2010 05:04:14 -0000 davidxu 2010-12-22 05:01:52 UTC FreeBSD src repository Modified files: lib/libthr/thread Makefile.inc thr_cond.c thr_init.c thr_kern.c thr_list.c thr_mutex.c thr_private.h thr_umtx.c thr_umtx.h sys/kern kern_umtx.c sys/sys _umtx.h umtx.h Log: SVN rev 216641 on 2010-12-22 05:01:52Z by davidxu MFp4: - Add flags CVWAIT_ABSTIME and CVWAIT_CLOCKID for umtx kernel based condition variable, this should eliminate an extra system call to get current time. - Add sub-function UMTX_OP_NWAKE_PRIVATE to wake up N channels in single system call. Create userland sleep queue for condition variable, in most cases, thread will wait in the queue, the pthread_cond_signal will defer thread wakeup until the mutex is unlocked, it tries to avoid an extra system call and a extra context switch in time window of pthread_cond_signal and pthread_mutex_unlock. The changes are part of process-shared mutex project. Revision Changes Path 1.21 +1 -0 src/lib/libthr/thread/Makefile.inc 1.29 +277 -100 src/lib/libthr/thread/thr_cond.c 1.59 +2 -0 src/lib/libthr/thread/thr_init.c 1.23 +92 -0 src/lib/libthr/thread/thr_kern.c 1.13 +4 -0 src/lib/libthr/thread/thr_list.c 1.80 +120 -82 src/lib/libthr/thread/thr_mutex.c 1.119 +106 -9 src/lib/libthr/thread/thr_private.h 1.21 +53 -0 src/lib/libthr/thread/thr_umtx.c 1.18 +11 -0 src/lib/libthr/thread/thr_umtx.h 1.92 +105 -15 src/sys/kern/kern_umtx.c 1.2 +2 -1 src/sys/sys/_umtx.h 1.35 +8 -3 src/sys/sys/umtx.h