mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-22 15:23:23 +00:00
实现SystemV共享内存 (#690)
* 实现SystemV共享内存 * 测试shm * 添加测试程序 * 完善细节 * 修正shm的时间数据错误的问题 * fix: devfs的metadata权限为0x777的错误 --------- Co-authored-by: longjin <longjin@DragonOS.org>
This commit is contained in:
@ -26,7 +26,7 @@ use crate::{
|
||||
sched::{schedule, SchedMode},
|
||||
time::{
|
||||
timer::{next_n_us_timer_jiffies, Timer, WakeUpHelper},
|
||||
TimeSpec,
|
||||
PosixTimeSpec,
|
||||
},
|
||||
};
|
||||
|
||||
@ -394,7 +394,7 @@ impl EventPoll {
|
||||
epfd: i32,
|
||||
epoll_event: &mut [EPollEvent],
|
||||
max_events: i32,
|
||||
timespec: Option<TimeSpec>,
|
||||
timespec: Option<PosixTimeSpec>,
|
||||
) -> Result<usize, SystemError> {
|
||||
let current_pcb = ProcessManager::current_pcb();
|
||||
let fd_table = current_pcb.fd_table();
|
||||
|
@ -9,7 +9,7 @@ use crate::{
|
||||
user_access::{UserBufferReader, UserBufferWriter},
|
||||
Syscall,
|
||||
},
|
||||
time::TimeSpec,
|
||||
time::PosixTimeSpec,
|
||||
};
|
||||
|
||||
use super::{EPollCtlOption, EPollEvent, EventPoll};
|
||||
@ -42,14 +42,14 @@ impl Syscall {
|
||||
|
||||
let mut timespec = None;
|
||||
if timeout == 0 {
|
||||
timespec = Some(TimeSpec::new(0, 0));
|
||||
timespec = Some(PosixTimeSpec::new(0, 0));
|
||||
}
|
||||
|
||||
if timeout > 0 {
|
||||
let sec: i64 = timeout as i64 / 1000;
|
||||
let nsec: i64 = 1000000 * (timeout as i64 % 1000);
|
||||
|
||||
timespec = Some(TimeSpec::new(sec, nsec))
|
||||
timespec = Some(PosixTimeSpec::new(sec, nsec))
|
||||
}
|
||||
|
||||
// 从用户传入的地址中拿到epoll_events
|
||||
|
Reference in New Issue
Block a user