PERFORCE change 108711 for review

Scott Long scottl at FreeBSD.org
Mon Oct 30 05:05:03 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=108711

Change 108711 by scottl at 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);
 }


More information about the p4-projects mailing list