mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-04-25 11:49:03 +02:00
Add a scheduler which just keeps of processes for now, and a
with_process to interact with them. User space now has it's own address space and mapper which means we will be able to allocate memory for it. I added a bunch of functions as stubs into libxunil which are required for doomgeneric.
This commit is contained in:
27
user/libxunil/src/mem.rs
Normal file
27
user/libxunil/src/mem.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
use core::ptr::null_mut;
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
extern "C" fn calloc(nitems: u64, size: u64) -> *mut u8 {
|
||||
null_mut()
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
extern "C" fn free(ptr: *mut u8) {}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
extern "C" fn malloc(size: u64) -> *mut u8 {
|
||||
null_mut()
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
extern "C" fn memcpy(dest_str: *mut u8, src_str: *const u8, n: u64) {}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
extern "C" fn memset(str: *mut u8, c: i64, n: u64) -> *mut u8 {
|
||||
null_mut()
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
unsafe extern "C" fn realloc(ptr: *mut u8, size: u64) -> *mut u8 {
|
||||
null_mut()
|
||||
}
|
||||
Reference in New Issue
Block a user