Willy Tarreau | 8f38bd0 | 2009-05-10 08:53:33 +0200 | [diff] [blame] | 1 | /* |
Willy Tarreau | 24f4efa | 2010-08-27 17:56:48 +0200 | [diff] [blame] | 2 | * include/proto/signal.h |
Willy Tarreau | 8f38bd0 | 2009-05-10 08:53:33 +0200 | [diff] [blame] | 3 | * Asynchronous signal delivery functions. |
| 4 | * |
Willy Tarreau | 24f4efa | 2010-08-27 17:56:48 +0200 | [diff] [blame] | 5 | * Copyright 2000-2010 Willy Tarreau <w@1wt.eu> |
Willy Tarreau | 8f38bd0 | 2009-05-10 08:53:33 +0200 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License |
| 9 | * as published by the Free Software Foundation; either version |
| 10 | * 2 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #include <signal.h> |
| 15 | #include <common/standard.h> |
| 16 | #include <types/signal.h> |
| 17 | |
| 18 | extern int signal_queue_len; |
| 19 | extern struct signal_descriptor signal_state[]; |
Willy Tarreau | 24f4efa | 2010-08-27 17:56:48 +0200 | [diff] [blame] | 20 | extern struct pool_head *pool2_sig_handlers; |
Willy Tarreau | 8f38bd0 | 2009-05-10 08:53:33 +0200 | [diff] [blame] | 21 | |
Willy Tarreau | d0807c3 | 2010-08-27 18:26:11 +0200 | [diff] [blame] | 22 | void signal_handler(int sig); |
Willy Tarreau | 8f38bd0 | 2009-05-10 08:53:33 +0200 | [diff] [blame] | 23 | void __signal_process_queue(); |
Willy Tarreau | 24f4efa | 2010-08-27 17:56:48 +0200 | [diff] [blame] | 24 | int signal_init(); |
| 25 | void deinit_signals(); |
| 26 | struct sig_handler *signal_register_fct(int sig, void (*fct)(struct sig_handler *), int arg); |
| 27 | struct sig_handler *signal_register_task(int sig, struct task *task, int reason); |
| 28 | void signal_unregister_handler(struct sig_handler *handler); |
| 29 | void signal_unregister_target(int sig, void *target); |
Willy Tarreau | 8f38bd0 | 2009-05-10 08:53:33 +0200 | [diff] [blame] | 30 | |
| 31 | static inline void signal_process_queue() |
| 32 | { |
| 33 | if (unlikely(signal_queue_len > 0)) |
| 34 | __signal_process_queue(); |
| 35 | } |
Willy Tarreau | 24f4efa | 2010-08-27 17:56:48 +0200 | [diff] [blame] | 36 | |
| 37 | /* |
| 38 | * Local variables: |
| 39 | * c-indent-level: 8 |
| 40 | * c-basic-offset: 8 |
| 41 | * End: |
| 42 | */ |