1 /*
2  * Copyright (c) 2017 Oticon A/S
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef NSI_COMMON_SRC_INCL_HW_SCHEDULER_H
8 #define NSI_COMMON_SRC_INCL_HW_SCHEDULER_H
9 
10 #include <stdint.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #define NSI_NEVER UINT64_MAX
17 
18 /* API intended for the native simulator specific embedded drivers: */
nsi_hws_get_time(void)19 static inline uint64_t nsi_hws_get_time(void)
20 {
21 	extern uint64_t nsi_simu_time;
22 	return nsi_simu_time;
23 }
24 
25 /* Internal APIs to the native_simulator and its HW models: */
26 void nsi_hws_init(void);
27 void nsi_hws_cleanup(void);
28 void nsi_hws_one_event(void);
29 void nsi_hws_set_end_of_time(uint64_t new_end_of_time);
30 void nsi_hws_find_next_event(void);
31 uint64_t nsi_hws_get_next_event_time(void);
32 
33 #ifdef __cplusplus
34 }
35 #endif
36 
37 #endif /* NSI_COMMON_SRC_INCL_HW_SCHEDULER_H */
38