diff options
author | 2020-12-06 19:18:30 +0000 | |
---|---|---|
committer | 2020-12-06 19:18:30 +0000 | |
commit | f55071da910b0e0a72a1543efa7c637abe9b720e (patch) | |
tree | daf909bcc5f7dfca81ecc9332187e00d0d8fda8c | |
parent | Enable t_mmap-1 test. It is skipped on NetBSD, but works for us. (diff) | |
download | wireguard-openbsd-f55071da910b0e0a72a1543efa7c637abe9b720e.tar.xz wireguard-openbsd-f55071da910b0e0a72a1543efa7c637abe9b720e.zip |
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@
-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 */ |