Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110163305
D47450.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D47450.diff
View Options
diff --git a/sys/powerpc/include/counter.h b/sys/powerpc/include/counter.h
--- a/sys/powerpc/include/counter.h
+++ b/sys/powerpc/include/counter.h
@@ -100,6 +100,8 @@
#else /* !64bit */
+#include <sys/systm.h>
+
#define counter_enter() critical_enter()
#define counter_exit() critical_exit()
diff --git a/sys/sys/_lock.h b/sys/sys/_lock.h
--- a/sys/sys/_lock.h
+++ b/sys/sys/_lock.h
@@ -33,8 +33,8 @@
struct lock_object {
const char *lo_name; /* Individual lock name. */
- u_int lo_flags;
- u_int lo_data; /* General class specific data. */
+ unsigned int lo_flags;
+ unsigned int lo_data; /* General class specific data. */
struct witness *lo_witness; /* Data for witness. */
};
diff --git a/sys/sys/_mutex.h b/sys/sys/_mutex.h
--- a/sys/sys/_mutex.h
+++ b/sys/sys/_mutex.h
@@ -31,6 +31,8 @@
#ifndef _SYS__MUTEX_H_
#define _SYS__MUTEX_H_
+#include <sys/_types.h>
+#include <sys/_lock.h>
#include <machine/param.h>
/*
@@ -44,7 +46,7 @@
*/
struct mtx {
struct lock_object lock_object; /* Common lock properties. */
- volatile uintptr_t mtx_lock; /* Owner and flags. */
+ volatile __uintptr_t mtx_lock; /* Owner and flags. */
};
/*
@@ -58,7 +60,7 @@
*/
struct mtx_padalign {
struct lock_object lock_object; /* Common lock properties. */
- volatile uintptr_t mtx_lock; /* Owner and flags. */
+ volatile __uintptr_t mtx_lock; /* Owner and flags. */
} __aligned(CACHE_LINE_SIZE);
#endif /* !_SYS__MUTEX_H_ */
diff --git a/sys/sys/_rmlock.h b/sys/sys/_rmlock.h
--- a/sys/sys/_rmlock.h
+++ b/sys/sys/_rmlock.h
@@ -32,6 +32,14 @@
#ifndef _SYS__RMLOCK_H_
#define _SYS__RMLOCK_H_
+#include <sys/_cpuset.h>
+#include <sys/_lock.h>
+#include <sys/_mutex.h>
+#include <sys/queue.h>
+#include <sys/_sx.h>
+
+struct thread;
+
/*
* Mostly reader/occasional writer lock.
*/
@@ -66,8 +74,6 @@
LIST_ENTRY(rm_priotracker) rmp_qentry;
};
-#include <sys/_mutex.h>
-
struct rmslock_pcpu;
struct rmslock {
diff --git a/sys/sys/_rwlock.h b/sys/sys/_rwlock.h
--- a/sys/sys/_rwlock.h
+++ b/sys/sys/_rwlock.h
@@ -28,6 +28,8 @@
#ifndef _SYS__RWLOCK_H_
#define _SYS__RWLOCK_H_
+#include <sys/_types.h>
+#include <sys/_lock.h>
#include <machine/param.h>
/*
@@ -41,7 +43,7 @@
*/
struct rwlock {
struct lock_object lock_object;
- volatile uintptr_t rw_lock;
+ volatile __uintptr_t rw_lock;
};
/*
@@ -55,7 +57,7 @@
*/
struct rwlock_padalign {
struct lock_object lock_object;
- volatile uintptr_t rw_lock;
+ volatile __uintptr_t rw_lock;
} __aligned(CACHE_LINE_SIZE);
#endif /* !_SYS__RWLOCK_H_ */
diff --git a/sys/sys/_sx.h b/sys/sys/_sx.h
--- a/sys/sys/_sx.h
+++ b/sys/sys/_sx.h
@@ -31,12 +31,15 @@
#ifndef _SYS__SX_H_
#define _SYS__SX_H_
+#include <sys/_types.h>
+#include <sys/_lock.h>
+
/*
* Shared/exclusive lock main structure definition.
*/
struct sx {
struct lock_object lock_object;
- volatile uintptr_t sx_lock;
+ volatile __uintptr_t sx_lock;
};
#endif /* !_SYS__SX_H_ */
diff --git a/sys/sys/file.h b/sys/sys/file.h
--- a/sys/sys/file.h
+++ b/sys/sys/file.h
@@ -37,13 +37,16 @@
#include <sys/fcntl.h>
#include <sys/unistd.h>
#else
-#include <sys/queue.h>
-#include <sys/refcount.h>
+#include <sys/errno.h>
#include <sys/_lock.h>
#include <sys/_mutex.h>
+#include <sys/_null.h>
+#include <sys/queue.h>
+#include <sys/refcount.h>
#include <vm/vm.h>
struct filedesc;
+struct proc;
struct stat;
struct thread;
struct uio;
diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h
--- a/sys/sys/ktls.h
+++ b/sys/sys/ktls.h
@@ -28,8 +28,11 @@
#define _SYS_KTLS_H_
#ifdef _KERNEL
+#include <sys/_null.h>
#include <sys/refcount.h>
#include <sys/_task.h>
+
+#include <machine/param.h>
#endif
struct tls_record_layer {
diff --git a/sys/sys/refcount.h b/sys/sys/refcount.h
--- a/sys/sys/refcount.h
+++ b/sys/sys/refcount.h
@@ -28,13 +28,14 @@
#ifndef __SYS_REFCOUNT_H__
#define __SYS_REFCOUNT_H__
-#include <machine/atomic.h>
-
-#include <sys/systm.h>
+#include <sys/types.h>
+#include <sys/kassert.h>
#if !defined(_KERNEL) && !defined(_STANDALONE)
#include <stdbool.h>
#endif
+#include <machine/atomic.h>
+
#define REFCOUNT_SATURATED(val) (((val) & (1U << 31)) != 0)
#define REFCOUNT_SATURATION_VALUE (3U << 30)
diff --git a/sys/sys/sglist.h b/sys/sys/sglist.h
--- a/sys/sys/sglist.h
+++ b/sys/sys/sglist.h
@@ -55,6 +55,7 @@
struct bio;
struct mbuf;
+struct thread;
struct uio;
static __inline void
diff --git a/tools/build/test-includes/badfiles.inc b/tools/build/test-includes/badfiles.inc
--- a/tools/build/test-includes/badfiles.inc
+++ b/tools/build/test-includes/badfiles.inc
@@ -100,7 +100,6 @@
sys/prng.h \
sys/qmath.h \
sys/racct.h \
- sys/refcount.h \
sys/resourcevar.h \
sys/rman.h \
sys/rmlock.h \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 15, 12:16 PM (11 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16655680
Default Alt Text
D47450.diff (4 KB)
Attached To
Mode
D47450: sys: Avoid relying on pollution from refcount.h
Attached
Detach File
Event Timeline
Log In to Comment