(ident: &Ident)
| 160 | } |
| 161 | |
| 162 | fn atomic_enum_get(ident: &Ident) -> TokenStream2 { |
| 163 | quote! { |
| 164 | /// Gets the value of the atomic without performing an atomic operation. |
| 165 | /// |
| 166 | /// This is safe because the mutable reference guarantees that no other threads are concurrently accessing the atomic data. |
| 167 | pub fn get(&mut self) -> #ident { |
| 168 | Self::from_usize(*self.0.get_mut()) |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | fn atomic_enum_swap_mut(ident: &Ident) -> TokenStream2 { |
| 174 | quote! { |