Implement atomic wrapper for integer-like type

This commit is contained in:
jellllly420
2024-09-24 16:30:09 +08:00
committed by Tate, Hongliang Tian
parent a7cb71161d
commit 21fedd1b60
26 changed files with 437 additions and 241 deletions

View File

@ -1,10 +1,10 @@
// SPDX-License-Identifier: MPL-2.0
use super::SyscallReturn;
use crate::prelude::*;
use crate::{prelude::*, process::Uid};
pub fn sys_geteuid(ctx: &Context) -> Result<SyscallReturn> {
let euid = ctx.posix_thread.credentials().euid();
Ok(SyscallReturn::Return(euid.as_u32() as _))
Ok(SyscallReturn::Return(<Uid as Into<u32>>::into(euid) as _))
}