From owner-cvs-all Wed Nov 8 21: 8:33 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 036BE37B4C5; Wed, 8 Nov 2000 21:08:28 -0800 (PST) Received: (from deischen@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id VAA57738; Wed, 8 Nov 2000 21:08:28 -0800 (PST) (envelope-from deischen@FreeBSD.org) Message-Id: <200011090508.VAA57738@freefall.freebsd.org> From: Daniel Eischen Date: Wed, 8 Nov 2000 21:08:28 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc_r/uthread pthread_private.h uthread_cond.c uthread_create.c uthread_detach.c uthread_exit.c uthread_info.c uthread_init.c uthread_jmp.c uthread_join.c uthread_kern.c uthread_mutex.c uthread_sig.c uthread_sigaction.c ... X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG deischen 2000/11/08 21:08:27 PST Modified files: lib/libc_r/uthread pthread_private.h uthread_cond.c uthread_create.c uthread_detach.c uthread_exit.c uthread_info.c uthread_init.c uthread_jmp.c uthread_join.c uthread_kern.c uthread_mutex.c uthread_sig.c uthread_sigaction.c uthread_sigmask.c Log: Don't needlessly poll file descriptors when there are no file descriptors needing to be polled (Doh!). Reported by Dan Nelson . Don't install and start the scheduling timer until the first thread is created. This prevents the overhead of having a periodic scheduling signal in a single threaded program. Reported by Dan Nelson . Allow builtin longjmps out of application installed signal handlers without the need perform any post-handler cleanup: o Change signal handling to save the threads interrupted context on the stack. The threads current context is now always stored in the same place (in the pthread). If and when a signal handler returns, the interrupted context is copied back to the storage area in the pthread. o Before calling invoking a signal handler for a thread, back the thread out of any internal waiting queues (mutex, CV, join, etc) to which it belongs. Rework uthread_info.c a bit to make it easier to change the format of a thread dump. Use an alternal signal stack for the thread library's signal handler. This allows us to fiddle with the main threads stack without fear of it being in use. Reviewed by: jasone Revision Changes Path 1.47 +39 -32 src/lib/libc_r/uthread/pthread_private.h 1.28 +103 -44 src/lib/libc_r/uthread/uthread_cond.c 1.27 +25 -22 src/lib/libc_r/uthread/uthread_create.c 1.13 +7 -2 src/lib/libc_r/uthread/uthread_detach.c 1.18 +15 -22 src/lib/libc_r/uthread/uthread_exit.c 1.17 +101 -126 src/lib/libc_r/uthread/uthread_info.c 1.26 +26 -30 src/lib/libc_r/uthread/uthread_init.c 1.5 +34 -125 src/lib/libc_r/uthread/uthread_jmp.c 1.14 +67 -39 src/lib/libc_r/uthread/uthread_join.c 1.32 +46 -43 src/lib/libc_r/uthread/uthread_kern.c 1.26 +25 -12 src/lib/libc_r/uthread/uthread_mutex.c 1.30 +148 -299 src/lib/libc_r/uthread/uthread_sig.c 1.13 +2 -2 src/lib/libc_r/uthread/uthread_sigaction.c 1.7 +4 -1 src/lib/libc_r/uthread/uthread_sigmask.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message