mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-15 17:16:47 +00:00
* refcount初始化 * new: 实现copy_sighand del: 删除sighand_struct的wqh, 待将来有需要时,替换成rust版本的 * new: 拷贝signal bugfix: 解决拷贝sighand时的uaf问题
15 lines
326 B
Rust
15 lines
326 B
Rust
use crate::include::bindings::bindings::List;
|
|
|
|
/// @brief 初始化链表
|
|
#[inline]
|
|
pub fn list_init(list: *mut List) {
|
|
unsafe{*list}.prev = list;
|
|
unsafe{*list}.next = list;
|
|
}
|
|
|
|
impl Default for List{
|
|
fn default() -> Self {
|
|
let x= Self { prev: 0 as *mut List, next: 0 as *mut List };
|
|
return x;
|
|
}
|
|
} |