Optimize syscall fast path without tracing.

This commit is contained in:
4lDO2
2024-03-18 20:38:11 +01:00
parent 33f0fa8709
commit 4862977fa5
10 changed files with 69 additions and 108 deletions
+1 -4
View File
@@ -111,10 +111,7 @@ pub fn exit(status: usize) -> ! {
}
pub fn getpid() -> Result<ContextId> {
let contexts = context::contexts();
let context_lock = contexts.current().ok_or(Error::new(ESRCH))?;
let context = context_lock.read();
Ok(context.id)
Ok(context::context_id())
}
pub fn getpgid(pid: ContextId) -> Result<ContextId> {