mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
增加epoll机制 (#455)
* ## 增加epoll机制 - 增加epoll机制 - 添加事件等待队列,提升socket性能 - 优化poll,删除不能poll的文件系统中的poll方法 * 添加细节注释 * 修复文件关闭后epoll还持有对应描述符的文件弱引用的bug * 将EPollEvent设计为POSIX标准 * 修改s到us转换的计算错误
This commit is contained in:
@ -21,7 +21,7 @@ use self::callback::{KernCallbackData, KernFSCallback, KernInodePrivateData};
|
||||
|
||||
use super::vfs::{
|
||||
core::generate_inode_id, file::FileMode, syscall::ModeType, FilePrivateData, FileSystem,
|
||||
FileType, FsInfo, IndexNode, InodeId, Metadata, PollStatus,
|
||||
FileType, FsInfo, IndexNode, InodeId, Metadata,
|
||||
};
|
||||
|
||||
pub mod callback;
|
||||
@ -293,11 +293,6 @@ impl IndexNode for KernFSInode {
|
||||
return Ok(keys);
|
||||
}
|
||||
|
||||
fn poll(&self) -> Result<PollStatus, SystemError> {
|
||||
// todo: 根据inode的具体attribute,返回PollStatus
|
||||
return Ok(PollStatus::READ | PollStatus::WRITE);
|
||||
}
|
||||
|
||||
fn read_at(
|
||||
&self,
|
||||
offset: usize,
|
||||
|
Reference in New Issue
Block a user