1 /*
2  * Copyright (c) 2018 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #ifndef ZEPHYR_INCLUDE_POSIX_SIGNAL_H_
7 #define ZEPHYR_INCLUDE_POSIX_SIGNAL_H_
8 
9 #include "posix_types.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #ifndef SIGEV_NONE
16 #define SIGEV_NONE 1
17 #endif
18 
19 #ifndef SIGEV_SIGNAL
20 #define SIGEV_SIGNAL 2
21 #endif
22 
23 #ifndef SIGEV_THREAD
24 #define SIGEV_THREAD 3
25 #endif
26 
27 typedef union sigval {
28 	int sival_int;
29 	void *sival_ptr;
30 } sigval;
31 
32 typedef struct sigevent {
33 	int sigev_notify;
34 	int sigev_signo;
35 	sigval sigev_value;
36 	void (*sigev_notify_function)(sigval val);
37 	#ifdef CONFIG_PTHREAD_IPC
38 	pthread_attr_t *sigev_notify_attributes;
39 	#endif
40 } sigevent;
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif /* ZEPHYR_INCLUDE_POSIX_SIGNAL_H_ */
47