Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151736113
D49881.id153868.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D49881.id153868.diff
View Options
diff --git a/sys/vm/vm_radix.h b/sys/vm/vm_radix.h
--- a/sys/vm/vm_radix.h
+++ b/sys/vm/vm_radix.h
@@ -257,6 +257,18 @@
return (VM_RADIX_PCTRIE_ITER_STEP_GE(pages));
}
+/*
+ * Iterate over each non-NULL page from page 'start' to the end of the object.
+ */
+#define VM_RADIX_FOREACH_FROM(m, pages, start) \
+ for (m = vm_radix_iter_lookup_ge(&pages, start); m != NULL; \
+ m = vm_radix_iter_step(&pages))
+
+/*
+ * Iterate over each non-NULL page from the beginning to the end of the object.
+ */
+#define VM_RADIX_FOREACH(m, pages) VM_RADIX_FOREACH_FROM(m, pages, 0)
+
/*
* Initialize an iterator pointing to the page with the greatest pindex that is
* less than or equal to the specified pindex, or NULL if there are no such
@@ -295,6 +307,20 @@
return (VM_RADIX_PCTRIE_ITER_NEXT(pages));
}
+/*
+ * Iterate over consecutive non-NULL pages from position 'start' to first NULL
+ * page.
+ */
+#define VM_RADIX_FORALL_FROM(m, pages, start) \
+ for (m = vm_radix_iter_lookup(&pages, start); m != NULL; \
+ m = vm_radix_iter_next(&pages))
+
+/*
+ * Iterate over consecutive non-NULL pages from the beginning to first NULL
+ * page.
+ */
+#define VM_RADIX_FORALL(m, pages) VM_RADIX_FORALL_FROM(m, pages, 0)
+
/*
* Update the iterator to point to the page with the pindex that is one less
* than the current pindex, or NULL if there is no such page. Return the page.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 11, 8:38 AM (3 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31279891
Default Alt Text
D49881.id153868.diff (1 KB)
Attached To
Mode
D49881: vm _radix: define foreach macros for walking pages
Attached
Detach File
Event Timeline
Log In to Comment