Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2006 05:05:02 GMT
From:      Scott Long <scottl@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 108711 for review
Message-ID:  <200610300505.k9U5524B023713@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=108711

Change 108711 by scottl@scottl-x64 on 2006/10/30 05:04:42

	Use msleep instead of tsleep

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/cam/cam_periph.c#13 edit

Differences ...

==== //depot/projects/scottl-camlock/src/sys/cam/cam_periph.c#13 (text+ko) ====

@@ -770,7 +770,7 @@
 		if ((SLIST_FIRST(&periph->ccb_list) != NULL)
 		 && (SLIST_FIRST(&periph->ccb_list)->pinfo.priority == priority))
 			break;
-		tsleep(&periph->ccb_list, PRIBIO, "cgticb", 0);
+		msleep(&periph->ccb_list, periph->sim->mtx, PRIBIO, "cgticb", 0);
 	}
 
 	ccb_h = SLIST_FIRST(&periph->ccb_list);
@@ -782,12 +782,14 @@
 void
 cam_periph_ccbwait(union ccb *ccb)
 {
+	struct cam_sim *sim;
 	int s;
 
 	s = splsoftcam();
+	sim = xpt_path_sim(ccb->ccb_h.path);
 	if ((ccb->ccb_h.pinfo.index != CAM_UNQUEUED_INDEX)
 	 || ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG))
-		tsleep(&ccb->ccb_h.cbfcnp, PRIBIO, "cbwait", 0);
+		msleep(&ccb->ccb_h.cbfcnp, sim->mtx, PRIBIO, "cbwait", 0);
 
 	splx(s);
 }



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