[Suspend2][ 2/7] [Suspend2] Return number of zones used.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Get the number of zones used. Used when relocating the pageflags (below).

Signed-off-by: Nigel Cunningham <[email protected]>

 kernel/power/pageflags.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/kernel/power/pageflags.c b/kernel/power/pageflags.c
index 81f0825..3781fc8 100644
--- a/kernel/power/pageflags.c
+++ b/kernel/power/pageflags.c
@@ -26,3 +26,14 @@ dyn_pageflags_t pageset1_copy_map;
 dyn_pageflags_t pageset2_map;
 dyn_pageflags_t in_use_map;
 
+static int num_zones(void)
+{
+	int result = 0;
+	struct zone *zone;
+
+	for_each_zone(zone)
+		result++;
+
+	return result;
+}
+

--
Nigel Cunningham		nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux