Introduce the JabyEngine namespace to all files

This commit is contained in:
2022-12-23 21:18:25 +01:00
parent 791fe85ab8
commit def6c6d3b9
27 changed files with 1320 additions and 1282 deletions

View File

@@ -2,14 +2,16 @@
#define __JABYENGINE_OVERLAY__HPP__
#include "../../stdint.h"
struct __attribute__((packed)) OverlayHeader {
void (*execute)();
uint16_t lba_size;
};
namespace JabyEngine {
struct __attribute__((packed)) OverlayHeader {
void (*execute)();
uint16_t lba_size;
};
// Maybe encode attributes like "isLZ4" into size parameter
struct __attribute__((packed)) OverlayLBA {
uint16_t lba;
uint16_t size;
};
// Maybe encode attributes like "isLZ4" into size parameter
struct __attribute__((packed)) OverlayLBA {
uint16_t lba;
uint16_t size;
};
}
#endif //!__JABYENGINE_OVERLAY__HPP__

View File

@@ -3,12 +3,12 @@
// No include here because this header should be included in a namespace and we don't want multiple namespace definitions of OverlayHeader and OverlayLBA
extern const OverlayHeader overlay_header;
extern const OverlayLBA overlay_lba[];
extern const JabyEngine::OverlayHeader overlay_header;
extern const JabyEngine::OverlayLBA overlay_lba[];
#define __declare_overlay_header(function, enum_struct) \
[[gnu::used]] \
const OverlayHeader __section(".header") overlay_header = {.execute = &function, .lba_size = static_cast<uint16_t>(enum_struct::EndOfRequest)}; \
const JabyEngine::OverlayHeader __section(".header") overlay_header = {.execute = &function, .lba_size = static_cast<uint16_t>(enum_struct::EndOfRequest)}; \
[[gnu::used]] \
const OverlayLBA __section(".header.lbas") overlay_lba[static_cast<int>(enum_struct::EndOfRequest)] = {0}
const JabyEngine::OverlayLBA __section(".header.lbas") overlay_lba[static_cast<int>(enum_struct::EndOfRequest)] = {0}
#endif //!__JABYENGINE_OVERLAY_DECLARATION__HPP__