1 /*
2  * Copyright 2018 Oticon A/S
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef BS_UTIL_TYPES_H
8 #define BS_UTIL_TYPES_H
9 
10 #include <stddef.h>
11 #include <stdbool.h>
12 #include <stdint.h>
13 #include <inttypes.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #pragma GCC diagnostic push
20 #pragma GCC diagnostic ignored "-Wpedantic"
21 /*It is relatively likely that we will be redefining uint, so let's void the warning*/
22 typedef unsigned int uint;
23 #pragma GCC diagnostic pop
24 
25 typedef uint64_t bs_time_t;
26 
27 #define TIME_NEVER UINT64_MAX
28 #define PRItime PRIu64
29 #define SCNtime SCNu64
30 
31 #if !defined(BSIM_INLINE)
32 #define BSIM_INLINE static __attribute__((__always_inline__)) inline
33 #endif
34 
35 #if !defined(INLINE) && !defined(DONT_DEFINE_INLINE)
36   #define INLINE BSIM_INLINE
37 #endif
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 #endif
44