/* * Subject to the GPL, version 2. */ #include "xmalloc.h" struct panic_handler { void *arg; pid_t pid; bool is_enabled; void (*on_panic)(void *arg); struct panic_handler *next; }; static struct panic_handler *panic_handlers; void panic_handler_add(void (*on_panic)(void *arg), void *arg) { struct panic_handler *handler = xmallocz(sizeof(*handler)); handler->arg = arg; handler->pid = getpid(); handler->is_enabled = true; handler->on_panic = on_panic; handler->next = panic_handlers; panic_handlers = handler; }; void call_panic_handlers(void) { struct panic_handler *it; pid_t pid = getpid(); for (it = panic_handlers; it; it = it->next) { if (it->pid == pid && it->is_enabled) { it->is_enabled = false; it->on_panic(it->arg); } } } ef='/cgit.cgi/linux/net-next.git/'>net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/include
type='hidden' name='id' value='56bae802681116dc279c40218b146b5a0c553a3b'/>
ModeNameSize
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-09-23 15:40:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-09-23 15:40:58 -0700
commit56bae802681116dc279c40218b146b5a0c553a3b (patch)
treeef7a993411e75bff9e136ff7e65262f5ccba6bf2 /drivers
parent0737c8d7aedfe590010e38c3e3bbdc87affa8c3d (diff)
parent24cc7fb69a5b5edfdff1d38c6a213d6a33648829 (diff)
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild fixes from Michal Marek: "There are two more kbuild fixes for 3.6. One fixes a race between x86's archscripts target and the rule (re)building scripts/basic/fixdep. The second is a fix for the previous attempt at fixing make firmware_install with make 3.82. This new solution should work with any version of GNU make" * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: x86/kbuild: archscripts depends on scripts_basic firmware: fix directory creation rule matching with make 3.80
Diffstat (limited to 'drivers')