[Suspend2][ 9/9] [Suspend2] Header file for pagedir functions.

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

 



kernel/power/pagedir.h declares structures and functions related to
pagedirs. A pagedir is a set of pages that are being stored in part of the
image. It used to be a far more substantial structure, containing a list of
pages. Since the advent of bitmaps, it just has the size. Pagedir.c
contains the routines for allocating and freeing memory when pagedir1 is
larger than pageset2 (generally only init S), marking which pages belong to
which pageset, and for obtaining pages that can safely be used during the
atomic copy.

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

 kernel/power/pagedir.h |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/kernel/power/pagedir.h b/kernel/power/pagedir.h
new file mode 100644
index 0000000..608b29a
--- /dev/null
+++ b/kernel/power/pagedir.h
@@ -0,0 +1,37 @@
+/*
+ * kernel/power/pagedir.h
+ *
+ * Copyright (C) 2004-2006 Nigel Cunningham <[email protected]>
+ *
+ * This file is released under the GPLv2.
+ *
+ * Declarations for routines for handling pagesets.
+ */
+
+/* Pagedir
+ *
+ * Contains the metadata for a set of pages saved in the image.
+ */
+
+struct pagedir {
+	long pageset_size;
+	long lastpageset_size;
+};
+
+extern struct pagedir pagedir1, pagedir2;
+
+extern void suspend_copy_pageset1(void);
+
+extern void suspend_free_extra_pagedir_memory(void);
+
+extern int suspend_allocate_extra_pagedir_memory(struct pagedir *p, int pageset_size, int alloc_from);
+
+extern void suspend_mark_task_as_pageset1 (struct task_struct *t);
+extern void suspend_mark_pages_for_pageset2(void);
+
+extern void suspend_relocate_if_required(unsigned long *current_value, unsigned int size);
+extern int suspend_get_pageset1_load_addresses(void);
+
+extern int extra_pagedir_pages_allocated;
+
+extern unsigned long suspend_get_nonconflicting_page(void);

--
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