From owner-cvs-src@FreeBSD.ORG Thu Feb 19 14:03:52 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 E876416A4D6; Thu, 19 Feb 2004 14:03:52 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE2D743D2F; Thu, 19 Feb 2004 14:03:52 -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 i1JM3qGe090283; Thu, 19 Feb 2004 14:03:52 -0800 (PST) (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i1JM3qW8090282; Thu, 19 Feb 2004 14:03:52 -0800 (PST) (envelope-from jhb) Message-Id: <200402192203.i1JM3qW8090282@repoman.freebsd.org> From: John Baldwin Date: Thu, 19 Feb 2004 14:03:52 -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_taskqueue.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: Thu, 19 Feb 2004 22:03:53 -0000 jhb 2004/02/19 14:03:52 PST FreeBSD src repository Modified files: sys/kern subr_taskqueue.c Log: Tidy up the thread taskqueue implementation and close a lost wakeup race. Instead of creating a mutex that we msleep on but don't actually lock when doing the corresponding wakeup(), in the kthread, lock the mutex associated with our taskqueue and msleep while the queue is empty. Assert that the queue is locked when the callback function is called to wake the kthread. Revision Changes Path 1.22 +9 -14 src/sys/kern/subr_taskqueue.c