Date: Mon, 21 Oct 2013 21:16:50 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256862 - head/sys/kern Message-ID: <201310212116.r9LLGoJW061401@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310212116.r9LLGoJW061401>