#include #include "subcmd-util.h" #include "sigchain.h" #define SIGCHAIN_MAX_SIGNALS 32 struct sigchain_signal { sigchain_fun *old; int n; int alloc; }; static struct sigchain_signal signals[SIGCHAIN_MAX_SIGNALS]; static void check_signum(int sig) { if (sig < 1 || sig >= SIGCHAIN_MAX_SIGNALS) die("BUG: signal out of range: %d", sig); } static int sigchain_push(int sig, sigchain_fun f) { struct sigchain_signal *s = signals + sig; check_signum(sig); ALLOC_GROW(s->old, s->n + 1, s->alloc); s->old[s->n] = signal(sig, f); if (s->old[s->n] == SIG_ERR) return -1; s->n++; return 0; } int sigchain_pop(int sig) { struct sigchain_signal *s = signals + sig; check_signum(sig); if (s->n < 1) return 0; if (signal(sig, s->old[s->n - 1]) == SIG_ERR) return -1; s->n--; return 0; } void sigchain_push_common(sigchain_fun f) { sigchain_push(SIGINT, f); sigchain_push(SIGHUP, f); sigchain_push(SIGTERM, f); sigchain_push(SIGQUIT, f); sigchain_push(SIGPIPE, f); } ();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/tools/perf/Documentation/perf-timechart.txt
t name='ignorews' onchange='this.form.submit();'>
AgeCommit message (Expand)AuthorFilesLines
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2016-12-14 17:56:51 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-04 18:22:43 +0100
commit5026c9cb0744a9cd40242743ca91a5d712f468c6 (patch)
tree4171538260ff4c23fb354ab45b5e06899fb1bce1 /net/dccp
parent0c744ea4f77d72b3dcebb7a8f2684633ec79be88 (diff)
mei: bus: fix mei_cldev_enable KDoc
Adjust function name in KDoc. Fixes: d49dc5e76fc9 (mei: bus: use mei_cldev_ prefix for the API functions) Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/dccp')