1 /*
2  * Copyright (c) 2020 Tobias Svehagen
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef TESTS_POSIX_EVENTFD_SRC__MAIN_H_
8 #define TESTS_POSIX_EVENTFD_SRC__MAIN_H_
9 
10 #include <errno.h>
11 #include <stdio.h>
12 
13 #include <zephyr/net/socket.h>
14 #include <zephyr/posix/poll.h>
15 #include <zephyr/posix/sys/eventfd.h>
16 #include <zephyr/posix/unistd.h>
17 #include <zephyr/ztest.h>
18 
19 #define TESTVAL 10
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 struct eventfd_fixture {
26 	int fd;
27 };
28 
29 void reopen(int *fd, int initval, int flags);
30 int is_blocked(int fd, short *event);
31 void eventfd_poll_set_common(int fd);
32 void eventfd_poll_unset_common(int fd);
33 
34 #ifdef __cplusplus
35 }
36 #endif
37 
38 #endif
39