-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pdsl_core] Move panic handlers and global allocator def to pdsl_core
- Loading branch information
Showing
6 changed files
with
31 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use core::panic::PanicInfo; | ||
use core::alloc::Layout; | ||
|
||
#[panic_handler] | ||
#[no_mangle] | ||
pub fn panic(_info: &PanicInfo) -> ! { | ||
unsafe { core::intrinsics::abort() } | ||
} | ||
|
||
#[alloc_error_handler] | ||
pub extern fn oom(_: Layout) -> ! { | ||
unsafe { core::intrinsics::abort(); } | ||
} | ||
|
||
#[lang = "eh_personality"] | ||
extern fn eh_personality() {} |