parent
7a704673d7
commit
4404982a55
@ -0,0 +1,14 @@
|
|||||||
|
use super::*;
|
||||||
|
|
||||||
|
pub fn sys_arch_prctl(code: i32, addr: usize, tf: &mut TrapFrame) -> SysResult {
|
||||||
|
const ARCH_SET_FS: i32 = 0x1002;
|
||||||
|
match code {
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
ARCH_SET_FS => {
|
||||||
|
info!("sys_arch_prctl: set FS to {:#x}", addr);
|
||||||
|
tf.fsbase = addr;
|
||||||
|
Ok(0)
|
||||||
|
}
|
||||||
|
_ => Err(SysError::Inval),
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue