Skip to content
Permalink
Browse files

rename wait_time

  • Loading branch information...
shartse committed Apr 2, 2019
1 parent 46c2041 commit 778a6fb28a589e9c91cb0c549fcb144a08030720
Showing with 4 additions and 4 deletions.
  1. +4 −4 module/zfs/zthr.c
@@ -215,7 +215,7 @@ struct zthr {
* if this is 0, the thread doesn't wake up until it gets
* signaled.
*/
hrtime_t zthr_wait_time;
hrtime_t zthr_sleep_timeout;

/* consumer-provided callbacks & data */
zthr_checkfunc_t *zthr_checkfunc;
@@ -238,11 +238,11 @@ zthr_procedure(void *arg)
mutex_enter(&t->zthr_state_lock);
} else {
/* go to sleep */
if (t->zthr_wait_time == 0) {
if (t->zthr_sleep_timeout == 0) {
cv_wait_sig(&t->zthr_cv, &t->zthr_state_lock);
} else {
(void) cv_timedwait_sig_hires(&t->zthr_cv,
&t->zthr_state_lock, t->zthr_wait_time,
&t->zthr_state_lock, t->zthr_sleep_timeout,
MSEC2NSEC(1), 0);
}
}
@@ -289,7 +289,7 @@ zthr_create_timer(zthr_checkfunc_t *checkfunc, zthr_func_t *func,
t->zthr_checkfunc = checkfunc;
t->zthr_func = func;
t->zthr_arg = arg;
t->zthr_wait_time = max_sleep;
t->zthr_sleep_timeout = max_sleep;

t->zthr_thread = thread_create(NULL, 0, zthr_procedure, t,
0, &p0, TS_RUN, minclsyspri);

0 comments on commit 778a6fb

Please sign in to comment.
You can’t perform that action at this time.