Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108613835
D40757.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
590 B
Referenced Files
None
Subscribers
None
D40757.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h
--- a/sys/compat/linuxkpi/common/include/linux/list.h
+++ b/sys/compat/linuxkpi/common/include/linux/list.h
@@ -466,6 +466,20 @@
return list->next == head;
}
+static inline size_t
+list_count_nodes(const struct list_head *list)
+{
+ const struct list_head *lh;
+ size_t count;
+
+ count = 0;
+ list_for_each(lh, list) {
+ count++;
+ }
+
+ return (count);
+}
+
#define hlist_entry(ptr, type, field) container_of(ptr, type, field)
#define hlist_for_each(p, head) \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 9:42 PM (8 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16214353
Default Alt Text
D40757.diff (590 B)
Attached To
Mode
D40757: LinuxKPI: list.h add list_count_nodes()
Attached
Detach File
Event Timeline
Log In to Comment