-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
实现SystemV共享内存 #690
实现SystemV共享内存 #690
Conversation
r? @fslongjin dragonosbot has assigned @fslongjin. Use |
这个pr目前有冲突哈哈 @Jomocool |
issue: #534 |
kernel/src/ipc/shm.rs
Outdated
/// 最后一次连接的时间 | ||
shm_atim: i64, | ||
/// 最后一次断开连接的时间 | ||
shm_dtim: i64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这几个时间的话使用Instant
结构体来表示会更好。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得TimeSpec应该会更好一点,因为Linux用户程序获取这些时间的好像是ns级别
暂时没有看出逻辑上的问题,能否传个测试程序上来? |
@dragonosbot review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
测试程序test_shm:
- sender:将信息写入共享内存中然后发送给receiver
- receiver:连接到sender创建的共享内存并读取数据
- info:打印共享内存各种信息
kernel/src/filesystem/devpts/mod.rs
Outdated
ctime: TimeSpec::default(), | ||
atime: PosixTimeSpec::default(), | ||
mtime: PosixTimeSpec::default(), | ||
ctime: PosixTimeSpec::default(), | ||
file_type: FileType::Dir, | ||
mode: ModeType::from_bits_truncate(0x777), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
笑死,我发现这里有个bug,mode应该是0o777
而不是0x777
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哈哈,还真是
为了跟其他测试程序作区分,我把他改了一下,加上了 |
No description provided.