mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
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
This commit is contained in:
parent
503f72a828
commit
61b0092be7
|
@ -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_ */
|
||||
|
|
Loading…
Reference in a new issue