1 /*
2  * Copyright (c) 2023 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /*
8  * This file provides in native_sim a set of APIs the native_posix board provided
9  * to allow building the native_posix drivers or applications which depended
10  * on those.
11  * Note that all these APIs should be considered deprecated in native_sim, as this
12  * exists solely as a transitional component.
13  */
14 
15 #ifndef BOARDS_POSIX_NATIVE_SIM_NATIVE_POSIX_COMPAT_H
16 #define BOARDS_POSIX_NATIVE_SIM_NATIVE_POSIX_COMPAT_H
17 
18 #warning "This transitional header is now deprecated and will be removed by v4.4. "\
19 	 "Use nsi_hw_scheduler.h instead."
20 
21 #include <stdint.h>
22 #include <zephyr/toolchain.h>
23 #include "nsi_hw_scheduler.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
hwm_find_next_timer(void)29 static ALWAYS_INLINE void hwm_find_next_timer(void)
30 {
31 	nsi_hws_find_next_event();
32 }
33 
hwm_get_time(void)34 static ALWAYS_INLINE uint64_t hwm_get_time(void)
35 {
36 	return nsi_hws_get_time();
37 }
38 
39 #define NEVER NSI_NEVER
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45 #endif /* BOARDS_POSIX_NATIVE_SIM_NATIVE_POSIX_COMPAT_H */
46