From owner-cvs-src@FreeBSD.ORG Fri Feb 27 10:33:09 2004 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 E208716A4CE; Fri, 27 Feb 2004 10:33:09 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC5EF43D2D; Fri, 27 Feb 2004 10:33:09 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i1RIX9Ge025965; Fri, 27 Feb 2004 10:33:09 -0800 (PST) (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i1RIX9WU025964; Fri, 27 Feb 2004 10:33:09 -0800 (PST) (envelope-from jhb) Message-Id: <200402271833.i1RIX9WU025964@repoman.freebsd.org> From: John Baldwin Date: Fri, 27 Feb 2004 10:33:09 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern subr_sleepqueue.c subr_turnstile.c subr_witness.c src/sys/sys sleepqueue.h 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, 27 Feb 2004 18:33:10 -0000 jhb 2004/02/27 10:33:09 PST FreeBSD src repository Modified files: sys/kern subr_turnstile.c subr_witness.c Added files: sys/kern subr_sleepqueue.c sys/sys sleepqueue.h Log: Add an implementation of a generic sleep queue abstraction that is used to queue threads sleeping on a wait channel similar to how turnstiles are used to queue threads waiting for a lock. This subsystem will be used as the backend for sleep/wakeup and condition variables initially. Eventually it will also be used to replace the ithread-specific iwait thread inhibitor. Sleep queues are also not locked by sched_lock, so this splits sched_lock up a bit further increasing concurrency within the scheduler. Sleep queues also natively support timeouts on sleeps and interruptible sleeps allowing for the reduction of a lot of duplicated code between the sleep/wakeup and condition variable implementations. For more details on the sleep queue implementation, check the comments in sys/sleepqueue.h and kern/subr_sleepqueue.c. Revision Changes Path 1.1 +776 -0 src/sys/kern/subr_sleepqueue.c (new) 1.140 +0 -5 src/sys/kern/subr_turnstile.c 1.170 +1 -0 src/sys/kern/subr_witness.c 1.1 +107 -0 src/sys/sys/sleepqueue.h (new)