Inherit HasDaddr for reference type

This commit is contained in:
Jianfeng Jiang
2024-04-29 03:07:02 +00:00
committed by Tate, Hongliang Tian
parent a482c87696
commit cd3faa8123
5 changed files with 17 additions and 3 deletions

View File

@ -8,6 +8,7 @@ use aster_frame::{
};
use aster_rights::{Dup, Exec, Full, Read, Signal, TRightSet, TRights, Write};
use aster_rights_proc::require;
use inherit_methods_macro::inherit_methods;
pub use pod::Pod;
pub use typeflags_util::SetContain;
@ -337,6 +338,11 @@ impl<T, R> SafePtr<T, DmaStream, R> {
}
}
#[inherit_methods(from = "(*self)")]
impl<'a, T, R> SafePtr<T, &'a DmaStream, R> {
pub fn sync(&self) -> Result<()>;
}
#[require(R > Dup)]
impl<T, M: Clone, R: TRights> Clone for SafePtr<T, M, TRightSet<R>> {
fn clone(&self) -> Self {