summaryrefslogtreecommitdiff
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorDomenico Andreoli <domenico.andreoli@linux.com>2020-05-07 10:19:52 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-05-19 18:48:08 +0300
commitab7e9b067f3d9cbec28cfca51d341efb421b7a51 (patch)
tree945ac12fc98f52d44b7f44bff01837cd62b9eb3e /kernel/power/power.h
parent3a4ccdb92e1e0f51844c8b60f2c0f48a4a620000 (diff)
downloadlinux-ab7e9b067f3d9cbec28cfca51d341efb421b7a51.tar.xz
PM: hibernate: Incorporate concurrency handling
Hibernation concurrency handling is currently delegated to user.c, where it's also used for regulating the access to the snapshot device. In the prospective of making user.c a separate configuration option, such mutual exclusion is brought into hibernate.c and made available through accessor helpers hereby introduced. Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index 7cdc64dc2373..ba2094db6294 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -154,8 +154,8 @@ extern int snapshot_write_next(struct snapshot_handle *handle);
extern void snapshot_write_finalize(struct snapshot_handle *handle);
extern int snapshot_image_loaded(struct snapshot_handle *handle);
-/* If unset, the snapshot device cannot be open. */
-extern atomic_t snapshot_device_available;
+extern bool hibernate_acquire(void);
+extern void hibernate_release(void);
extern sector_t alloc_swapdev_block(int swap);
extern void free_all_swap_pages(int swap);