git: cd133525fad1 - main - smr: Remove the return value from smr_wait()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 Mar 2023 14:51:07 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd133525fad197ac8cbbd4bd68860a4dd51a561f commit cd133525fad197ac8cbbd4bd68860a4dd51a561f Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-02-07 21:38:07 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-03-13 14:45:35 +0000 smr: Remove the return value from smr_wait() This is supposed to be a blocking version of smr_poll(), so there's no need for a return value. No functional change intended. MFC after: 1 week --- share/man/man9/smr.9 | 2 +- sys/kern/subr_smr.c | 1 + sys/sys/smr.h | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/share/man/man9/smr.9 b/share/man/man9/smr.9 index 7b2ed65b4368..32ef313c0988 100644 --- a/share/man/man9/smr.9 +++ b/share/man/man9/smr.9 @@ -64,7 +64,7 @@ .Fo smr_synchronize .Fa "smr_t smr" .Fc -.Ft bool +.Ft void .Fo smr_wait .Fa "smr_t smr" .Fa "smr_seq_t goal" diff --git a/sys/kern/subr_smr.c b/sys/kern/subr_smr.c index cbbf185fee79..df2520005673 100644 --- a/sys/kern/subr_smr.c +++ b/sys/kern/subr_smr.c @@ -579,6 +579,7 @@ out: */ atomic_thread_fence_acq(); + KASSERT(success || !wait, ("%s: blocking poll failed", __func__)); return (success); } diff --git a/sys/sys/smr.h b/sys/sys/smr.h index 1319e2bf465b..2b6dbeb998da 100644 --- a/sys/sys/smr.h +++ b/sys/sys/smr.h @@ -241,11 +241,11 @@ void smr_destroy(smr_t smr); /* * Blocking wait for all readers to observe 'goal'. */ -static inline bool +static inline void smr_wait(smr_t smr, smr_seq_t goal) { - return (smr_poll(smr, goal, true)); + (void)smr_poll(smr, goal, true); } /*