1 //! System calls. 2 3 /// Change the data segment. See `man brk`. 4 /// 5 /// On success, the new program break is returned. On failure, the old program break is returned. 6 /// 7 /// # Note 8 /// 9 /// This is the `brk` **syscall**, not the library function. 10 pub unsafe fn brk(ptr: *const u8) -> *const u8 { 11 syscall!(BRK, ptr) as *const u8 12 } 13 14 /// Voluntarily give a time slice to the scheduler. 15 pub fn sched_yield() -> usize { 16 unsafe { syscall!(SCHED_YIELD) } 17 } 18