git: 08dbe7213452 - stable/14 - condvar: Clean up condvar.h a bit
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Jan 2024 14:28:07 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=08dbe72134524de9c5b4a675b0bdf6773bbee8b0
commit 08dbe72134524de9c5b4a675b0bdf6773bbee8b0
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-01-15 17:27:11 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-29 14:25:45 +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
(cherry picked from commit 61b0092be751b8241b65cc14e4167d431f1e5ad8)
---
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_ */