Date: Mon, 15 Jan 2024 18:07:58 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 61b0092be751 - main - condvar: Clean up condvar.h a bit Message-ID: <202401151807.40FI7wB1080275@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=61b0092be751b8241b65cc14e4167d431f1e5ad8 commit 61b0092be751b8241b65cc14e4167d431f1e5ad8 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-01-15 17:27:11 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-01-15 17:27:11 +0000 condvar: Clean up condvar.h a bit - Remove a typedef that has been unused for a long time. - Remove a LOCORE guard. MI headers like condvar.h don't need such a guard in general. - Move a forward declaration into the _KERNEL block. - Add a types.h include to make the file self-contained. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43449 --- sys/sys/condvar.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/sys/condvar.h b/sys/sys/condvar.h index 23558879452c..cd16c85024d4 100644 --- a/sys/sys/condvar.h +++ b/sys/sys/condvar.h @@ -29,14 +29,6 @@ #ifndef _SYS_CONDVAR_H_ #define _SYS_CONDVAR_H_ -#ifndef LOCORE -#include <sys/queue.h> - -struct lock_object; -struct thread; - -TAILQ_HEAD(cv_waitq, thread); - /* * Condition variable. The waiters count is protected by the mutex that * protects the condition; that is, the mutex that is passed to cv_wait*() @@ -49,6 +41,10 @@ struct cv { }; #ifdef _KERNEL +#include <sys/types.h> + +struct lock_object; + void cv_init(struct cv *cvp, const char *desc); void cv_destroy(struct cv *cvp); @@ -85,5 +81,4 @@ void cv_broadcastpri(struct cv *cvp, int pri); #define cv_wmesg(cvp) ((cvp)->cv_description) #endif /* _KERNEL */ -#endif /* !LOCORE */ #endif /* _SYS_CONDVAR_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401151807.40FI7wB1080275>