kernel: add c++ support

This commit is contained in:
2023-03-20 20:41:39 +00:00
parent a4d850cc03
commit 2bfb6bcd78
41 changed files with 333 additions and 38 deletions

View File

@@ -5,6 +5,10 @@
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
extern void data_size_to_string(size_t value, char *out, size_t outsz);
static inline bool power_of_2(size_t x) { return (x > 0 && (x & (x - 1)) == 0); }
static inline unsigned long long div64_pow2(unsigned long long x, unsigned long long y)
@@ -17,4 +21,8 @@ static inline unsigned long long absdiff64(unsigned long long x, unsigned long l
return x > y ? y - x : x - y;
}
#ifdef __cplusplus
}
#endif
#endif