Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Aug 2010 08:38:04 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r211928 - head/sys/kern
Message-ID:  <201008280838.o7S8c4TQ024371@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Sat Aug 28 08:38:03 2010
New Revision: 211928
URL: http://svn.freebsd.org/changeset/base/211928

Log:
  Run all tasks from a proper context, with proper priority, etc.
  
  Reviewed by:	jhb
  MFC after:	1 month

Modified:
  head/sys/kern/subr_taskqueue.c

Modified: head/sys/kern/subr_taskqueue.c
==============================================================================
--- head/sys/kern/subr_taskqueue.c	Sat Aug 28 08:30:20 2010	(r211927)
+++ head/sys/kern/subr_taskqueue.c	Sat Aug 28 08:38:03 2010	(r211928)
@@ -141,7 +141,6 @@ taskqueue_free(struct taskqueue *queue)
 
 	TQ_LOCK(queue);
 	queue->tq_flags &= ~TQ_FLAGS_ACTIVE;
-	taskqueue_run(queue, &queue->tq_running);
 	taskqueue_terminate(queue->tq_threads, queue);
 	mtx_destroy(&queue->tq_mutex);
 	free(queue->tq_threads, M_TASKQUEUE);
@@ -372,6 +371,7 @@ taskqueue_thread_loop(void *arg)
 			break;
 		TQ_SLEEP(tq, tq, &tq->tq_mutex, 0, "-", 0);
 	}
+	taskqueue_run(tq, &running);
 
 	/* rendezvous with thread that asked us to terminate */
 	tq->tq_tcount--;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008280838.o7S8c4TQ024371>