xref: /btstack/platform/posix/btstack_signal.h (revision 2fca4dad957cd7b88f4657ed51e89c12615dda72)
1970469cfSMatthias Ringwald /*
2970469cfSMatthias Ringwald  * Copyright (C) 2021 BlueKitchen GmbH
3970469cfSMatthias Ringwald  *
4970469cfSMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
5970469cfSMatthias Ringwald  * modification, are permitted provided that the following conditions
6970469cfSMatthias Ringwald  * are met:
7970469cfSMatthias Ringwald  *
8970469cfSMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
9970469cfSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
10970469cfSMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11970469cfSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
12970469cfSMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
13970469cfSMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
14970469cfSMatthias Ringwald  *    contributors may be used to endorse or promote products derived
15970469cfSMatthias Ringwald  *    from this software without specific prior written permission.
16970469cfSMatthias Ringwald  * 4. Any redistribution, use, or modification is done solely for
17970469cfSMatthias Ringwald  *    personal benefit and not for any commercial purpose or for
18970469cfSMatthias Ringwald  *    monetary gain.
19970469cfSMatthias Ringwald  *
20970469cfSMatthias Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21970469cfSMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22970469cfSMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23*2fca4dadSMilanka Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN
24*2fca4dadSMilanka Ringwald  * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25970469cfSMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26970469cfSMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27970469cfSMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28970469cfSMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29970469cfSMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30970469cfSMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31970469cfSMatthias Ringwald  * SUCH DAMAGE.
32970469cfSMatthias Ringwald  *
33970469cfSMatthias Ringwald  * Please inquire about commercial licensing options at
34970469cfSMatthias Ringwald  * contact@bluekitchen-gmbh.com
35970469cfSMatthias Ringwald  *
36970469cfSMatthias Ringwald  */
37970469cfSMatthias Ringwald 
38970469cfSMatthias Ringwald /*
39970469cfSMatthias Ringwald  *  Support for handling POSIX signals
40970469cfSMatthias Ringwald  */
41970469cfSMatthias Ringwald 
42970469cfSMatthias Ringwald #ifndef BTSTACK_SIGNAL_H
43970469cfSMatthias Ringwald #define BTSTACK_SIGNAL_H
44970469cfSMatthias Ringwald 
45970469cfSMatthias Ringwald #if defined __cplusplus
46970469cfSMatthias Ringwald extern "C" {
47970469cfSMatthias Ringwald #endif
48970469cfSMatthias Ringwald 
49970469cfSMatthias Ringwald /* API_START */
50970469cfSMatthias Ringwald 
51970469cfSMatthias Ringwald /**
52970469cfSMatthias Ringwald  * Register callback for signal
53970469cfSMatthias Ringwald  */
54970469cfSMatthias Ringwald void btstack_signal_register_callback(int signal, void (*callback)(void));
55970469cfSMatthias Ringwald 
56970469cfSMatthias Ringwald /* API_END */
57970469cfSMatthias Ringwald 
58970469cfSMatthias Ringwald #if defined __cplusplus
59970469cfSMatthias Ringwald }
60970469cfSMatthias Ringwald #endif
61970469cfSMatthias Ringwald 
62970469cfSMatthias Ringwald #endif //BTSTACK_SIGNAL_H
63