#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); } .git Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2016-06-06 16:56:49 +0100
committerPhilipp Zabel <p.zabel@pengutronix.de>2016-06-29 21:24:52 +0200
commit3c35f6edc09b239a60de87a5aeb78563fc372704 (patch)
tree63a36f9ae0481aee1396ba32abe7c97c72c7d63f
parent1a695a905c18548062509178b98bc91e67510864 (diff)
reset: Reorder inline reset_control_get*() wrappers
We're about to split the current API into two, where consumers will be forced to be explicit when requesting reset lines. The choice will be to either the call the *_exclusive or *_shared variant depending on whether they can actually tolorate not being asserted when that request is made. The new API will look like this once reorded and complete: reset_control_get_exclusive() reset_control_get_shared() reset_control_get_optional_exclusive() reset_control_get_optional_shared() of_reset_control_get_exclusive() of_reset_control_get_shared() of_reset_control_get_exclusive_by_index() of_reset_control_get_shared_by_index() devm_reset_control_get_exclusive() devm_reset_control_get_shared() devm_reset_control_get_optional_exclusive() devm_reset_control_get_optional_shared() devm_reset_control_get_exclusive_by_index() devm_reset_control_get_shared_by_index() Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>