Merge remote branch 'crater/master' into vkernel64
[dragonfly.git] / sys / vm / vm_page.c
index b360147..c25de4e 100644 (file)
@@ -845,6 +845,17 @@ vm_wait_nominal(void)
                vm_wait(0);
 }
 
+/*
+ * Test if vm_wait_nominal() would block.
+ */
+int
+vm_test_nominal(void)
+{
+       if (vm_page_count_min(0))
+               return(1);
+       return(0);
+}
+
 /*
  * Block until free pages are available for allocation, called in various
  * places before memory allocations.