mirror of
https://github.com/Noratrieb/libuwuc.git
synced 2026-01-15 04:05:06 +01:00
more things
This commit is contained in:
parent
1baf8df4a8
commit
5673cf51db
18 changed files with 292 additions and 9 deletions
14
rawc/src/stdlib.rs
Normal file
14
rawc/src/stdlib.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#[no_mangle]
|
||||
pub unsafe extern "C" fn malloc(size: usize) -> *mut u8 {
|
||||
libuwuc::alloc::malloc_zeroed(size, 16)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn free(ptr: *mut u8) {
|
||||
libuwuc::alloc::free(ptr)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn exit(code: i32) -> ! {
|
||||
libuwuc::start::exit(code as i64 as _)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue