Willy Tarreau | 8f38bd0 | 2009-05-10 08:53:33 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Asynchronous signal delivery functions. |
| 3 | * |
| 4 | * Copyright 2000-2009 Willy Tarreau <w@1wt.eu> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | */ |
| 12 | |
| 13 | #include <signal.h> |
| 14 | #include <common/standard.h> |
| 15 | #include <types/signal.h> |
| 16 | |
| 17 | extern int signal_queue_len; |
| 18 | extern struct signal_descriptor signal_state[]; |
| 19 | |
| 20 | void signal_init(); |
| 21 | void signal_handler(int sig); |
| 22 | void signal_register(int sig, void (*handler)(int)); |
| 23 | void __signal_process_queue(); |
| 24 | |
| 25 | static inline void signal_process_queue() |
| 26 | { |
| 27 | if (unlikely(signal_queue_len > 0)) |
| 28 | __signal_process_queue(); |
| 29 | } |