about summary refs log tree commit diff
path: root/library/panic_unwind
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-05-28 18:37:58 +0200
committerRalf Jung <post@ralfj.de>2025-06-07 21:45:58 +0200
commit8808c9d34b04c8c9404aafaba2aeec4142963fa5 (patch)
tree9cbced8402c84a847185f35c6eb389b502e8014d /library/panic_unwind
parent5e0bdaa9dde845b8e44fd93bf0c09d21ca60daa1 (diff)
intrinsics: use const generic to set atomic ordering
Diffstat (limited to 'library/panic_unwind')
-rw-r--r--library/panic_unwind/src/seh.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/panic_unwind/src/seh.rs b/library/panic_unwind/src/seh.rs
index 3794b56c089..003ac4f0cd3 100644
--- a/library/panic_unwind/src/seh.rs
+++ b/library/panic_unwind/src/seh.rs
@@ -291,7 +291,7 @@ cfg_if::cfg_if! {
 }
 
 pub(crate) unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
-    use core::intrinsics::atomic_store_seqcst;
+    use core::intrinsics::{AtomicOrdering, atomic_store};
 
     // _CxxThrowException executes entirely on this stack frame, so there's no
     // need to otherwise transfer `data` to the heap. We just pass a stack
@@ -325,23 +325,23 @@ pub(crate) unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
     // In any case, we basically need to do something like this until we can
     // express more operations in statics (and we may never be able to).
     unsafe {
-        atomic_store_seqcst(
+        atomic_store::<_, { AtomicOrdering::SeqCst }>(
             (&raw mut THROW_INFO.pmfnUnwind).cast(),
             ptr_t::new(exception_cleanup as *mut u8).raw(),
         );
-        atomic_store_seqcst(
+        atomic_store::<_, { AtomicOrdering::SeqCst }>(
             (&raw mut THROW_INFO.pCatchableTypeArray).cast(),
             ptr_t::new((&raw mut CATCHABLE_TYPE_ARRAY).cast()).raw(),
         );
-        atomic_store_seqcst(
+        atomic_store::<_, { AtomicOrdering::SeqCst }>(
             (&raw mut CATCHABLE_TYPE_ARRAY.arrayOfCatchableTypes[0]).cast(),
             ptr_t::new((&raw mut CATCHABLE_TYPE).cast()).raw(),
         );
-        atomic_store_seqcst(
+        atomic_store::<_, { AtomicOrdering::SeqCst }>(
             (&raw mut CATCHABLE_TYPE.pType).cast(),
             ptr_t::new((&raw mut TYPE_DESCRIPTOR).cast()).raw(),
         );
-        atomic_store_seqcst(
+        atomic_store::<_, { AtomicOrdering::SeqCst }>(
             (&raw mut CATCHABLE_TYPE.copyFunction).cast(),
             ptr_t::new(exception_copy as *mut u8).raw(),
         );