From owner-cvs-src@FreeBSD.ORG Fri May 16 12:58:31 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F5CB37B401; Fri, 16 May 2003 12:58:31 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7E2D43F75; Fri, 16 May 2003 12:58:30 -0700 (PDT) (envelope-from deischen@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4GJwU0U079262; Fri, 16 May 2003 12:58:30 -0700 (PDT) (envelope-from deischen@repoman.freebsd.org) Received: (from deischen@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4GJwUbc079261; Fri, 16 May 2003 12:58:30 -0700 (PDT) Message-Id: <200305161958.h4GJwUbc079261@repoman.freebsd.org> From: Daniel Eischen Date: Fri, 16 May 2003 12:58:30 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libpthread/sys lock.c lock.h src/lib/libpthread/thread thr_cond.c thr_exit.c thr_init.c thr_join.c thr_kern.c thr_mutex.c thr_nanosleep.c thr_private.h thr_sig.c thr_sigsuspend.c thr_sigwait.c thr_yield.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 19:58:31 -0000 deischen 2003/05/16 12:58:30 PDT FreeBSD src repository Modified files: lib/libpthread/sys lock.c lock.h lib/libpthread/thread thr_cond.c thr_exit.c thr_init.c thr_join.c thr_kern.c thr_mutex.c thr_nanosleep.c thr_private.h thr_sig.c thr_sigsuspend.c thr_sigwait.c thr_yield.c Log: Add a method of yielding the current thread with the scheduler lock held (_thr_sched_switch_unlocked()) and use this to avoid dropping the scheduler lock and having the scheduler retake the same lock again. Add a better way of detecting if a low-level lock is in use. When switching out a thread due to blocking in the UTS, don't switch to the KSE's scheduler stack only to switch back to another thread. If possible switch to the new thread directly from the old thread and avoid the overhead of the extra context switch. Check for pending signals on a thread when entering the scheduler and add them to the threads signal frame. This includes some other minor signal fixes. Most of this was a joint effor between davidxu and myself. Reviewed by: davidxu Approved by: re@ (blanket for libpthread) Revision Changes Path 1.4 +28 -28 src/lib/libpthread/sys/lock.c 1.4 +4 -1 src/lib/libpthread/sys/lock.h 1.40 +4 -4 src/lib/libpthread/thread/thr_cond.c 1.32 +1 -2 src/lib/libpthread/thread/thr_exit.c 1.52 +2 -0 src/lib/libpthread/thread/thr_init.c 1.25 +4 -2 src/lib/libpthread/thread/thr_join.c 1.65 +157 -116 src/lib/libpthread/thread/thr_kern.c 1.35 +9 -9 src/lib/libpthread/thread/thr_mutex.c 1.20 +1 -3 src/lib/libpthread/thread/thr_nanosleep.c 1.87 +22 -23 src/lib/libpthread/thread/thr_private.h 1.50 +110 -118 src/lib/libpthread/thread/thr_sig.c 1.17 +1 -3 src/lib/libpthread/thread/thr_sigsuspend.c 1.25 +1 -2 src/lib/libpthread/thread/thr_sigwait.c 1.12 +0 -4 src/lib/libpthread/thread/thr_yield.c