2009-05-10 06:53:33 +00:00
|
|
|
/*
|
2010-08-27 15:56:48 +00:00
|
|
|
* include/proto/signal.h
|
2009-05-10 06:53:33 +00:00
|
|
|
* Asynchronous signal delivery functions.
|
|
|
|
*
|
2010-08-27 15:56:48 +00:00
|
|
|
* Copyright 2000-2010 Willy Tarreau <w@1wt.eu>
|
2009-05-10 06:53:33 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version
|
|
|
|
* 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <signal.h>
|
|
|
|
#include <common/standard.h>
|
|
|
|
#include <types/signal.h>
|
2012-09-02 20:34:23 +00:00
|
|
|
#include <types/task.h>
|
2009-05-10 06:53:33 +00:00
|
|
|
|
|
|
|
extern int signal_queue_len;
|
|
|
|
extern struct signal_descriptor signal_state[];
|
2010-08-27 15:56:48 +00:00
|
|
|
extern struct pool_head *pool2_sig_handlers;
|
2009-05-10 06:53:33 +00:00
|
|
|
|
2010-08-27 16:26:11 +00:00
|
|
|
void signal_handler(int sig);
|
2009-05-10 06:53:33 +00:00
|
|
|
void __signal_process_queue();
|
2010-08-27 15:56:48 +00:00
|
|
|
int signal_init();
|
|
|
|
void deinit_signals();
|
|
|
|
struct sig_handler *signal_register_fct(int sig, void (*fct)(struct sig_handler *), int arg);
|
|
|
|
struct sig_handler *signal_register_task(int sig, struct task *task, int reason);
|
|
|
|
void signal_unregister_handler(struct sig_handler *handler);
|
|
|
|
void signal_unregister_target(int sig, void *target);
|
2009-05-10 06:53:33 +00:00
|
|
|
|
|
|
|
static inline void signal_process_queue()
|
|
|
|
{
|
|
|
|
if (unlikely(signal_queue_len > 0))
|
|
|
|
__signal_process_queue();
|
|
|
|
}
|
2010-08-27 15:56:48 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* c-indent-level: 8
|
|
|
|
* c-basic-offset: 8
|
|
|
|
* End:
|
|
|
|
*/
|