You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Add kernel/notifier.c
There is separate notifier header, but no separate notifier .c file. Extract notifier code out of kernel/sys.c which will remain for misc syscalls I hope. Merge kernel/die_notifier.c into kernel/notifier.c. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
3ed75eb8f1
commit
fe9d4f5763
@@ -240,5 +240,7 @@ static inline int notifier_to_errno(int ret)
|
||||
#define KBD_KEYSYM 0x0004 /* Keyboard keysym */
|
||||
#define KBD_POST_KEYSYM 0x0005 /* Called after keyboard keysym interpretation */
|
||||
|
||||
extern struct blocking_notifier_head reboot_notifier_list;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_NOTIFIER_H */
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
|
||||
signal.o sys.o kmod.o workqueue.o pid.o \
|
||||
rcupdate.o extable.o params.o posix-timers.o \
|
||||
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
|
||||
hrtimer.o rwsem.o latency.o nsproxy.o srcu.o die_notifier.o \
|
||||
utsname.o sysctl_check.o
|
||||
hrtimer.o rwsem.o latency.o nsproxy.o srcu.o \
|
||||
utsname.o sysctl_check.o notifier.o
|
||||
|
||||
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
||||
obj-y += time/
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/kdebug.h>
|
||||
|
||||
|
||||
static ATOMIC_NOTIFIER_HEAD(die_chain);
|
||||
|
||||
int notify_die(enum die_val val, const char *str,
|
||||
struct pt_regs *regs, long err, int trap, int sig)
|
||||
{
|
||||
struct die_args args = {
|
||||
.regs = regs,
|
||||
.str = str,
|
||||
.err = err,
|
||||
.trapnr = trap,
|
||||
.signr = sig,
|
||||
|
||||
};
|
||||
|
||||
return atomic_notifier_call_chain(&die_chain, val, &args);
|
||||
}
|
||||
|
||||
int register_die_notifier(struct notifier_block *nb)
|
||||
{
|
||||
vmalloc_sync_all();
|
||||
return atomic_notifier_chain_register(&die_chain, nb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(register_die_notifier);
|
||||
|
||||
int unregister_die_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return atomic_notifier_chain_unregister(&die_chain, nb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(unregister_die_notifier);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
-531
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user