新增网络socket的系统调用接口 (#247)

1.修复spinlock忘记恢复rflags的问题
2.WaitQueue增加wakeup_all的功能
3.完善tcp,udp,raw socket
4.把PollStatus结构体改为使用bitflags
5.新增iovec结构体
6.完成网络的系统调用
7.在bootstrap里面添加dnsmasq bridge-utils iptables

---------

Co-authored-by: guanjinquan <1666320330@qq.com>
This commit is contained in:
login
2023-04-19 18:05:02 +08:00
committed by GitHub
parent 8fd71f2772
commit cde5492f72
33 changed files with 2535 additions and 240 deletions

View File

@ -244,6 +244,10 @@ impl<T> DerefMut for SpinLockGuard<'_, T> {
/// @brief 为SpinLockGuard实现Drop方法那么一旦守卫的生命周期结束就会自动释放自旋锁避免了忘记放锁的情况
impl<T> Drop for SpinLockGuard<'_, T> {
fn drop(&mut self) {
self.lock.lock.unlock();
if self.flag != 0 {
self.lock.lock.unlock_irqrestore(&self.flag);
} else {
self.lock.lock.unlock();
}
}
}