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

@@ -14,7 +14,7 @@
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
@@ -26,6 +26,10 @@
#include <limits.h>
#include <socks/types.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MEMBLOCK_INIT_MEMORY_REGION_COUNT 128
#define MEMBLOCK_INIT_RESERVED_REGION_COUNT 128
@@ -50,7 +54,7 @@
if you don't want to use an upper bound, pass UINTPTR_MAX.
EXAMPLE: to iterate through all memory regions (with no bounds):
memblock_iter_t it;
for_each_mem_region (&it, 0x0, UINTPTR_MAX) { ... }
@@ -80,7 +84,7 @@
if you don't want to use an upper bound, pass UINTPTR_MAX.
EXAMPLE: to iterate through all reserved memory regions (with no bounds):
memblock_iter_t it;
for_each_reserved_mem_region (&it, 0x0, UINTPTR_MAX) { ... }
@@ -319,4 +323,8 @@ extern void __next_memory_region(memblock_iter_t *it, \
memblock_type_t *type_a, memblock_type_t *type_b,
phys_addr_t start, phys_addr_t end);
#ifdef __cplusplus
}
#endif
#endif