From owner-svn-src-all@FreeBSD.ORG Mon Oct 21 21:16:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3D5E784D; Mon, 21 Oct 2013 21:16:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B30026B4; Mon, 21 Oct 2013 21:16:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9LLGojo061402; Mon, 21 Oct 2013 21:16:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9LLGoJW061401; Mon, 21 Oct 2013 21:16:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201310212116.r9LLGoJW061401@svn.freebsd.org> From: Alexander Motin Date: Mon, 21 Oct 2013 21:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256862 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2013 21:16:51 -0000 Author: mav Date: Mon Oct 21 21:16:50 2013 New Revision: 256862 URL: http://svnweb.freebsd.org/changeset/base/256862 Log: Add comments that taskqueue_enqueue_locked() returns without the lock. Modified: head/sys/kern/subr_taskqueue.c Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Mon Oct 21 21:13:01 2013 (r256861) +++ head/sys/kern/subr_taskqueue.c Mon Oct 21 21:16:50 2013 (r256862) @@ -237,6 +237,7 @@ taskqueue_enqueue_locked(struct taskqueu if ((queue->tq_flags & TQ_FLAGS_UNLOCKED_ENQUEUE) == 0) TQ_UNLOCK(queue); + /* Return with lock released. */ return (0); } int @@ -246,6 +247,7 @@ taskqueue_enqueue(struct taskqueue *queu TQ_LOCK(queue); res = taskqueue_enqueue_locked(queue, task); + /* The lock is released inside. */ return (res); } @@ -262,6 +264,7 @@ taskqueue_timeout_func(void *arg) timeout_task->f &= ~DT_CALLOUT_ARMED; queue->tq_callouts--; taskqueue_enqueue_locked(timeout_task->q, &timeout_task->t); + /* The lock is released inside. */ } int @@ -278,6 +281,7 @@ taskqueue_enqueue_timeout(struct taskque res = timeout_task->t.ta_pending; if (ticks == 0) { taskqueue_enqueue_locked(queue, &timeout_task->t); + /* The lock is released inside. */ } else { if ((timeout_task->f & DT_CALLOUT_ARMED) != 0) { res++;