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>
|
2017-05-30 13:34:30 +00:00
|
|
|
#include <common/hathreads.h>
|
|
|
|
|
2009-05-10 06:53:33 +00:00
|
|
|
#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[];
|
|
|
|
|
2017-11-13 09:34:01 +00:00
|
|
|
__decl_hathreads(extern HA_SPINLOCK_T signals_lock);
|
2017-05-30 13:34:30 +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
|
|
|
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);
|
2018-11-20 16:36:52 +00:00
|
|
|
void signal_unregister(int sig);
|
2018-09-11 08:06:23 +00:00
|
|
|
void haproxy_unblock_signals();
|
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:
|
|
|
|
*/
|