From owner-cvs-src@FreeBSD.ORG Tue Mar 25 22:38:46 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 759BC1065675; Tue, 25 Mar 2008 22:38:46 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4E19C8FC16; Tue, 25 Mar 2008 22:38:46 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2PMckvh017198; Tue, 25 Mar 2008 22:38:46 GMT (envelope-from scottl@repoman.freebsd.org) Received: (from scottl@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2PMcjOE017197; Tue, 25 Mar 2008 22:38:45 GMT (envelope-from scottl) Message-Id: <200803252238.m2PMcjOE017197@repoman.freebsd.org> From: Scott Long Date: Tue, 25 Mar 2008 22:38:45 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sys taskqueue.h src/sys/kern subr_taskqueue.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 25 Mar 2008 22:38:46 -0000 scottl 2008-03-25 22:38:45 UTC FreeBSD src repository Modified files: sys/sys taskqueue.h sys/kern subr_taskqueue.c Log: Implement taskqueue_block() and taskqueue_unblock(). These functions allow the owner of a queue to block and unblock execution of the tasks in the queue while allowing tasks to continue to be added queue. Combining this with taskqueue_drain() allows a queue to be safely disabled. The unblock function may run (or schedule to run) the queue when it is called, just as calling taskqueue_enqueue() would. Reviewed by: jhb, sam Revision Changes Path 1.41 +28 -1 src/sys/kern/subr_taskqueue.c 1.18 +2 -0 src/sys/sys/taskqueue.h