diff --git a/agb/src/lib.rs b/agb/src/lib.rs index 73963fcc..7cbe83d6 100644 --- a/agb/src/lib.rs +++ b/agb/src/lib.rs @@ -231,6 +231,10 @@ pub struct Gba { impl Gba { #[doc(hidden)] #[must_use] + /// # Safety + /// + /// May only be called a single time. It is not needed to call this due to + /// it being called internally by the [`entry`] macro. pub unsafe fn new_in_entry() -> Self { Self::single_new() } diff --git a/agb/src/sync/mod.rs b/agb/src/sync/mod.rs index 17dad495..826a8326 100644 --- a/agb/src/sync/mod.rs +++ b/agb/src/sync/mod.rs @@ -33,6 +33,8 @@ pub fn memory_write_hint(val: *mut T) { /// This seems to be a problem caused by Rust issue #62256: /// /// +/// # Safety +/// /// **WARNING FOR ANYONE WHO FINDS THIS**: This implementation will *only* be /// correct on the GBA, and should not be used on any other platform. The GBA /// is very old, and has no atomics to begin with - only a main thread and