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

@@ -3,6 +3,10 @@
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define BITS_PER_WORD (8 * sizeof(unsigned long))
#define __DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
#define BITMAP_WORDS(nbits) __DIV_ROUND_UP(nbits, BITS_PER_WORD)
@@ -23,4 +27,8 @@ extern unsigned int bitmap_highest_clear(unsigned long *map, unsigned long nbits
extern unsigned int bitmap_lowest_set(unsigned long *map, unsigned long nbits);
extern unsigned int bitmap_lowest_clear(unsigned long *map, unsigned long nbits);
#ifdef __cplusplus
}
#endif
#endif