Tom Dohrmann 3 vuotta sitten
vanhempi
commit
2da8c0e244
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      rsdp/src/handler.rs

+ 4 - 2
rsdp/src/handler.rs

@@ -23,7 +23,7 @@ where
     ///
     /// ## Safety
     ///
-    /// This function must only be called by the `AcpiHandler` `H` to make sure that it's safe to unmap the mapping.
+    /// This function must only be called by an `AcpiHandler` of type `H` to make sure that it's safe to unmap the mapping.
     ///
     /// - `virtual_start` must be a valid pointer.
     /// - `region_length` must be equal to or larger than `size_of::<T>()`.
@@ -96,6 +96,8 @@ pub trait AcpiHandler: Clone {
     /// - `size` must be at least `size_of::<T>()`.
     unsafe fn map_physical_region<T>(&self, physical_address: usize, size: usize) -> PhysicalMapping<Self, T>;
 
-    /// Unmap the given physical mapping. This is called when a `PhysicalMapping` is dropped.
+    /// Unmap the given physical mapping. This is called when a `PhysicalMapping` is dropped, you should **not** manually call this.
+    ///
+    /// Note: A reference to the handler used to construct `region` can be acquired by calling [`PhysicalMapping::handler`].
     fn unmap_physical_region<T>(region: &PhysicalMapping<Self, T>);
 }