Date: Fri, 16 May 2003 12:58:30 -0700 (PDT) From: Daniel Eischen <deischen@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org 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 Message-ID: <200305161958.h4GJwUbc079261@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305161958.h4GJwUbc079261>