notifier.c (5e2aa2ed08e2e280121dc7cf5609c87d464f12ef) | notifier.c (83fe27ea531161a655f02dc7732d14cfaa27fd5d) |
---|---|
1#include <linux/kdebug.h> 2#include <linux/kprobes.h> 3#include <linux/export.h> 4#include <linux/notifier.h> 5#include <linux/rcupdate.h> 6#include <linux/vmalloc.h> 7#include <linux/reboot.h> 8 --- 388 unchanged lines hidden (view full) --- 397 398int raw_notifier_call_chain(struct raw_notifier_head *nh, 399 unsigned long val, void *v) 400{ 401 return __raw_notifier_call_chain(nh, val, v, -1, NULL); 402} 403EXPORT_SYMBOL_GPL(raw_notifier_call_chain); 404 | 1#include <linux/kdebug.h> 2#include <linux/kprobes.h> 3#include <linux/export.h> 4#include <linux/notifier.h> 5#include <linux/rcupdate.h> 6#include <linux/vmalloc.h> 7#include <linux/reboot.h> 8 --- 388 unchanged lines hidden (view full) --- 397 398int raw_notifier_call_chain(struct raw_notifier_head *nh, 399 unsigned long val, void *v) 400{ 401 return __raw_notifier_call_chain(nh, val, v, -1, NULL); 402} 403EXPORT_SYMBOL_GPL(raw_notifier_call_chain); 404 |
405#ifdef CONFIG_SRCU |
|
405/* 406 * SRCU notifier chain routines. Registration and unregistration 407 * use a mutex, and call_chain is synchronized by SRCU (no locks). 408 */ 409 410/** 411 * srcu_notifier_chain_register - Add notifier to an SRCU notifier chain 412 * @nh: Pointer to head of the SRCU notifier chain --- 110 unchanged lines hidden (view full) --- 523{ 524 mutex_init(&nh->mutex); 525 if (init_srcu_struct(&nh->srcu) < 0) 526 BUG(); 527 nh->head = NULL; 528} 529EXPORT_SYMBOL_GPL(srcu_init_notifier_head); 530 | 406/* 407 * SRCU notifier chain routines. Registration and unregistration 408 * use a mutex, and call_chain is synchronized by SRCU (no locks). 409 */ 410 411/** 412 * srcu_notifier_chain_register - Add notifier to an SRCU notifier chain 413 * @nh: Pointer to head of the SRCU notifier chain --- 110 unchanged lines hidden (view full) --- 524{ 525 mutex_init(&nh->mutex); 526 if (init_srcu_struct(&nh->srcu) < 0) 527 BUG(); 528 nh->head = NULL; 529} 530EXPORT_SYMBOL_GPL(srcu_init_notifier_head); 531 |
532#endif /* CONFIG_SRCU */ 533 |
|
531static ATOMIC_NOTIFIER_HEAD(die_chain); 532 533int notrace notify_die(enum die_val val, const char *str, 534 struct pt_regs *regs, long err, int trap, int sig) 535{ 536 struct die_args args = { 537 .regs = regs, 538 .str = str, --- 21 unchanged lines hidden --- | 534static ATOMIC_NOTIFIER_HEAD(die_chain); 535 536int notrace notify_die(enum die_val val, const char *str, 537 struct pt_regs *regs, long err, int trap, int sig) 538{ 539 struct die_args args = { 540 .regs = regs, 541 .str = str, --- 21 unchanged lines hidden --- |