1 /* 2 * include/proto/signal.h 3 * Asynchronous signal delivery functions. 4 * 5 * Copyright 2000-2010 Willy Tarreau <w@1wt.eu> 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 <common/hathreads.h> 17 18 #include <types/signal.h> 19 #include <types/task.h> 20 21 extern int signal_queue_len; 22 extern struct signal_descriptor signal_state[]; 23 extern struct pool_head *pool_head_sig_handlers; 24 25 __decl_hathreads(extern HA_SPINLOCK_T signals_lock); 26 27 void signal_handler(int sig); 28 void __signal_process_queue(); 29 int signal_init(); 30 void deinit_signals(); 31 struct sig_handler *signal_register_fct(int sig, void (*fct)(struct sig_handler *), int arg); 32 struct sig_handler *signal_register_task(int sig, struct task *task, int reason); 33 void signal_unregister_handler(struct sig_handler *handler); 34 void signal_unregister_target(int sig, void *target); 35 signal_process_queue()36static inline void signal_process_queue() 37 { 38 if (unlikely(signal_queue_len > 0)) 39 __signal_process_queue(); 40 } 41 42 /* 43 * Local variables: 44 * c-indent-level: 8 45 * c-basic-offset: 8 46 * End: 47 */ 48