Skip to content

Commit d81e4a0

Browse files
committed
Add abort
This is defined by the C standard to indicate abnormal program terminaiton; it is defined to call raise(SIGABRT), and to not return. This can be useful when panics are not an option, such as signal handlers handling stack overflow.
1 parent 30f70ba commit d81e4a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ extern {
206206
pub fn malloc(size: size_t) -> *mut c_void;
207207
pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
208208
pub fn free(p: *mut c_void);
209+
pub fn abort() -> !;
209210
pub fn exit(status: c_int) -> !;
210211
pub fn _exit(status: c_int) -> !;
211212
pub fn atexit(cb: extern fn()) -> c_int;

0 commit comments

Comments
 (0)