mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 17:33:23 +00:00
Implement atomic wrapper for integer-like type
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
a7cb71161d
commit
21fedd1b60
@ -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 _))
|
||||
}
|
||||
|
Reference in New Issue
Block a user