diff options
author | cheloha <cheloha@cvs.openbsd.org> | 2020-12-06 19:18:31 +0000 |
---|---|---|
committer | cheloha <cheloha@cvs.openbsd.org> | 2020-12-06 19:18:31 +0000 |
commit | d2d8cc1f41968023b2142eef66711cb272cac48d (patch) | |
tree | aa6d19110a1514705ca5d5a00b8f5410d67fc574 /sys | |
parent | f238ef67b5b47cfbdc4b10b873d7dc2fd63524c4 (diff) |
srp_finalize(9): tsleep(9) -> tsleep_nsec(9)
srp_finalize(9) spins until the refcount hits zero. Blocking for at
least 1ms each iteration instead of blocking for at most 1 tick is
sufficient.
Discussed with mpi@.
ok claudio@ jmatthew@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_srp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_srp.c b/sys/kern/kern_srp.c index 52fb4490047..14d514e493d 100644 --- a/sys/kern/kern_srp.c +++ b/sys/kern/kern_srp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_srp.c,v 1.12 2017/09/08 05:36:53 deraadt Exp $ */ +/* $OpenBSD: kern_srp.c,v 1.13 2020/12/06 19:18:30 cheloha Exp $ */ /* * Copyright (c) 2014 Jonathan Matthew <jmatthew@openbsd.org> @@ -274,7 +274,7 @@ void srp_finalize(void *v, const char *wmesg) { while (srp_referenced(v)) - tsleep(v, PWAIT, wmesg, 1); + tsleep_nsec(v, PWAIT, wmesg, MSEC_TO_NSEC(1)); } #else /* MULTIPROCESSOR */ |