Use sx_sleep() in the main loop of the accounting kthread.

This commit is contained in:
John Baldwin 2007-03-09 23:29:31 +00:00
parent 7c25c5c447
commit 6caa5f40a2

View File

@ -562,9 +562,8 @@ acct_thread(void *dummy)
* to exit.
*/
if (!(acct_state & ACCT_EXITREQ)) {
sx_xunlock(&acct_sx);
tsleep(&acct_state, pri, "-", acctchkfreq * hz);
sx_xlock(&acct_sx);
sx_sleep(&acct_state, &acct_sx, 0, "-",
acctchkfreq * hz);
}
}