Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178134721
D36099.1796071626.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
863 B
Referenced Files
None
Subscribers
None
D36099.1796071626.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/kref.h b/sys/compat/linuxkpi/common/include/linux/kref.h
--- a/sys/compat/linuxkpi/common/include/linux/kref.h
+++ b/sys/compat/linuxkpi/common/include/linux/kref.h
@@ -43,6 +43,7 @@
#include <asm/atomic.h>
struct kref {
+ /* XXX In Linux this is a refcount_t */
atomic_t refcount;
};
diff --git a/sys/compat/linuxkpi/common/include/linux/refcount.h b/sys/compat/linuxkpi/common/include/linux/refcount.h
--- a/sys/compat/linuxkpi/common/include/linux/refcount.h
+++ b/sys/compat/linuxkpi/common/include/linux/refcount.h
@@ -79,4 +79,15 @@
return (false);
}
+/*
+ * struct kref uses atomic_t and not refcount_t so
+ * we differ from Linux here.
+ */
+static inline bool
+refcount_dec_and_test(atomic_t *r)
+{
+
+ return (atomic_dec_and_test(r));
+}
+
#endif /* __LINUXKPI_LINUX_REFCOUNT_H__ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 30, 8:47 PM (20 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42112640
Default Alt Text
D36099.1796071626.diff (863 B)
Attached To
Mode
D36099: linuxkpi: Add refcount_dec_and_test
Attached
Detach File
Event Timeline