aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/notifier.h
diff options
context:
space:
mode:
authorDmitry Osipenko <dmitry.osipenko@collabora.com>2022-05-10 02:32:10 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-05-19 19:30:30 +0200
commitc82f898d873ce10d88f8d60b38c8dd19f1ed7c66 (patch)
tree71df2d32a177655702f8241e7eca842db2b4fd37 /include/linux/notifier.h
parent13dfd97a341a5cf9d15f415dd469f45e971ef12a (diff)
downloadlinux-c82f898d873ce10d88f8d60b38c8dd19f1ed7c66.tar.gz
notifier: Add blocking/atomic_notifier_chain_register_unique_prio()
Add variant of blocking/atomic_notifier_chain_register() functions that allow registration of a notifier only if it has unique priority, otherwise -EBUSY error code is returned by the new functions. Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/notifier.h')
-rw-r--r--include/linux/notifier.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 95e2440037de14..aef88c2d117366 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -150,6 +150,11 @@ extern int raw_notifier_chain_register(struct raw_notifier_head *nh,
extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh,
struct notifier_block *nb);
+extern int atomic_notifier_chain_register_unique_prio(
+ struct atomic_notifier_head *nh, struct notifier_block *nb);
+extern int blocking_notifier_chain_register_unique_prio(
+ struct blocking_notifier_head *nh, struct notifier_block *nb);
+
extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh,
struct notifier_block *nb);
extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh,