PERFORCE change 115610 for review
John Baldwin
jhb at FreeBSD.org
Fri Mar 9 16:13:53 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=115610
Change 115610 by jhb at jhb_zion on 2007/03/09 16:13:46
Use pause().
Affected files ...
.. //depot/projects/smpng/sys/modules/crash/crash.c#36 integrate
.. //depot/projects/smpng/sys/modules/crash2/crash2.c#20 integrate
Differences ...
==== //depot/projects/smpng/sys/modules/crash/crash.c#36 (text+ko) ====
@@ -239,7 +239,7 @@
{
rw_init(&baz, "baz");
rw_rlock(&baz);
- tsleep(&baz, 0, "-", 1);
+ pause("-", 1);
rw_runlock(&baz);
rw_destroy(&baz);
}
@@ -753,7 +753,7 @@
printf("Should panic\n");
THREAD_NO_SLEEPING();
- tsleep(&test1_mtx, 0, "sleep", 1);
+ pause("sleep", 1);
THREAD_SLEEPING_OK();
}
CRASH_EVENT("sleep while sleeping is prohibited", test_no_sleeping);
==== //depot/projects/smpng/sys/modules/crash2/crash2.c#20 (text+ko) ====
@@ -138,7 +138,7 @@
sx_xlock(sxs[thread % 4]);
else
lockmgr(locks[thread % 4], LK_EXCLUSIVE, NULL, curthread);
- tsleep(sxs, 0, "slp_dead", hz/10);
+ pause("slp_dead", hz/10);
if (thread % 2)
lockmgr(locks[(thread + 1) % 4], LK_SHARED, NULL, curthread);
else
@@ -152,7 +152,7 @@
{
lockmgr(locks[thread % 4], LK_EXCLUSIVE, NULL, curthread);
- tsleep(locks, 0, "lk_dead", hz/10);
+ pause("lk_dead", hz/10);
lockmgr(locks[(thread + 1) % 4], LK_EXCLUSIVE, NULL, curthread);
}
CRASH2_EVENT("lockmgr cycle", lockmgr_deadlock, lockmgr_deadlock,
@@ -163,7 +163,7 @@
{
sx_xlock(sxs[thread % 4]);
- tsleep(sxs, 0, "sx_dead", hz/10);
+ pause("sx_dead", hz/10);
sx_xlock(sxs[(thread + 1) % 4]);
}
CRASH2_EVENT("sx cycle", sx_deadlock, sx_deadlock, sx_deadlock, sx_deadlock);
@@ -226,7 +226,7 @@
{
mtx_lock(&bar);
- tsleep(&bar, 0, "bar", hz/100);
+ pause("bar", hz/100);
mtx_unlock(&bar);
}
CRASH2_EVENT("sleep holding bar", bar_sleep, bar_sleep, bar_sleep, bar_sleep);
More information about the p4-projects
mailing list