mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-19 12:36:46 +00:00
11 lines
265 B
Rust
11 lines
265 B
Rust
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
use super::SyscallReturn;
|
|
use crate::prelude::*;
|
|
|
|
pub fn sys_getpid(ctx: &Context) -> Result<SyscallReturn> {
|
|
let pid = ctx.process.pid();
|
|
debug!("[sys_getpid]: pid = {}", pid);
|
|
Ok(SyscallReturn::Return(pid as _))
|
|
}
|