#include #include #include "sig.h" void register_signal(int signal, void (*handler)(int)) { sigset_t block_mask; struct sigaction saction; sigfillset(&block_mask); saction.sa_handler = handler; saction.sa_mask = block_mask; saction.sa_flags = SA_RESTART; sigaction(signal, &saction, NULL); } void register_signal_f(int signal, void (*handler)(int), int flags) { sigset_t block_mask; struct sigaction saction; sigfillset(&block_mask); saction.sa_handler = handler; saction.sa_mask = block_mask; saction.sa_flags = flags; sigaction(signal, &saction, NULL); } pository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2016-07-29 14:00:27 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-08-08 15:41:34 +0200
commitddebf6612c5dcc479725867b9fd9a4d98f41350f (patch)
tree9b3e4bbf7df3c0c8b6260a1a3b08582ce61bf3eb
parenta48ed867153c6d2f6d058267213a82dbd8b6737a (diff)
s390/qdio: fix double return code evaluation
qdio sometimes checks return codes twice. First with the ccw device's lock held and then a 2nd time after the lock is released. Simplify the code by releasing the lock earlier and unify the return code evaluation. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Reviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>