Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Oct 2013 12:15:34 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r256623 - projects/camlock/sys/cam
Message-ID:  <201310161215.r9GCFYpY094502@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Oct 16 12:15:33 2013
New Revision: 256623
URL: http://svnweb.freebsd.org/changeset/base/256623

Log:
  Oops, fix for r256622: put THREAD_NO_SLEEPING() into the better place.

Modified:
  projects/camlock/sys/cam/cam_xpt.c

Modified: projects/camlock/sys/cam/cam_xpt.c
==============================================================================
--- projects/camlock/sys/cam/cam_xpt.c	Wed Oct 16 12:13:20 2013	(r256622)
+++ projects/camlock/sys/cam/cam_xpt.c	Wed Oct 16 12:15:33 2013	(r256623)
@@ -5265,7 +5265,6 @@ xpt_done_td(void *arg)
 	STAILQ_HEAD(, ccb_hdr)	doneq;
 
 	STAILQ_INIT(&doneq);
-	THREAD_NO_SLEEPING();
 	mtx_lock(&queue->cam_doneq_mtx);
 	while (1) {
 		while (STAILQ_EMPTY(&queue->cam_doneq)) {
@@ -5277,11 +5276,13 @@ xpt_done_td(void *arg)
 		STAILQ_CONCAT(&doneq, &queue->cam_doneq);
 		mtx_unlock(&queue->cam_doneq_mtx);
 
+		THREAD_NO_SLEEPING();
 		while ((ccb_h = STAILQ_FIRST(&doneq)) != NULL) {
 			STAILQ_REMOVE_HEAD(&doneq, sim_links.stqe);
 			ccb_h->pinfo.index = CAM_UNQUEUED_INDEX;
 			xpt_done_process(ccb_h);
 		}
+		THREAD_SLEEPING_OK();
 
 		mtx_lock(&queue->cam_doneq_mtx);
 	}



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