Cover lbas
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
#ifndef __JABYENGINE_OVERLAY_DECLARATION__H__
|
||||
#define __JABYENGINE_OVERLAY_DECLARATION__H__
|
||||
#ifndef __JABYENGINE_OVERLAY_DECLARATION__HPP__
|
||||
#define __JABYENGINE_OVERLAY_DECLARATION__HPP__
|
||||
|
||||
// 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[];
|
||||
|
||||
#define __declare_overlay_header(function) \
|
||||
#define __declare_overlay_header(function, enum_struct) \
|
||||
[[gnu::used]] \
|
||||
const OverlayHeader __section(".header") overlay_header = {.execute = &function};
|
||||
|
||||
#define __declare_overlay_lbas(...) \
|
||||
const 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[] = {__VA_ARGS__};
|
||||
#endif //!__JABYENGINE_OVERLAY_DECLARATION__H__
|
||||
const OverlayLBA __section(".header.lbas") overlay_lba[static_cast<int>(enum_struct::EndOfRequest)] = {0}
|
||||
#endif //!__JABYENGINE_OVERLAY_DECLARATION__HPP__
|
||||
Reference in New Issue
Block a user