MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / sys_debug_write

Function sys_debug_write

kernel/src/syscalls.rs:315–326  ·  view source on GitHub ↗
(ptr: *const u8, len:usize)

Source from the content-addressed store, hash-verified

313}
314
315fn sys_debug_write(ptr: *const u8, len:usize) {
316 // Check all inputs: Does ptr -> ptr+len lie entirely in user address space?
317 if len == 0 {
318 return;
319 }
320 // Convert raw pointer to a slice
321 let u8_slice = unsafe {slice::from_raw_parts(ptr, len)};
322
323 if let Ok(s) = str::from_utf8(u8_slice) {
324 print!("{}", s);
325 } // else error
326}
327
328
329fn sys_receive(context_ptr: *mut Context, handle: u64) {

Callers 1

dispatch_syscallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected