mirror of
https://github.com/panpaul/tiny_os
synced 2024-09-20 01:35:19 +08:00
feat: kernel/objects/null: add override_cap
This commit is contained in:
parent
55547d336e
commit
13180fe9f4
@ -14,6 +14,10 @@ impl<'a> NullCap<'a> {
|
||||
pub fn mint() -> RawCap {
|
||||
RawCap::new(0, 0, PhysAddr(0), ObjectType::Null)
|
||||
}
|
||||
|
||||
pub fn override_cap(&self, new: RawCap) {
|
||||
unsafe { self.cte.cap.update(|cap| *cap = new) };
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for NullCap<'_> {
|
||||
|
Loading…
Reference in New Issue
Block a user