mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 11:16:57 -04:00
Add pre-defined panic utilities
This commit is contained in:
parent
4c38be1560
commit
1fa64fccbf
3 changed files with 29 additions and 0 deletions
|
@ -23,6 +23,11 @@ __attribute__ ((noreturn)) void generic_panic(void) {
|
|||
panic(0xFF000006);
|
||||
}
|
||||
|
||||
__attribute__ ((noreturn)) void panic_predefined(uint32_t which) {
|
||||
static const uint32_t codes[0x10] = {COLOR_0, COLOR_1, COLOR_2, COLOR_3, COLOR_4, COLOR_5, COLOR_6, COLOR_7, COLOR_8, COLOR_9, COLOR_A, COLOR_B, COLOR_C, COLOR_D, COLOR_E, COLOR_F};
|
||||
panic(codes[which & 0xF]);
|
||||
}
|
||||
|
||||
__attribute__((noinline)) bool overlaps(uint64_t as, uint64_t ae, uint64_t bs, uint64_t be)
|
||||
{
|
||||
if(as <= bs && bs <= ae)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue