diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-08-13 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-08-23 16:24:59 +0200 |
| commit | f5db0c7110fc728701444c40a7372f0ea3cd40ce (patch) | |
| tree | a38e2a5309559e10f54cf2aa65c5fc234caf099b /library/panic_unwind/src | |
| parent | 3bc5e322cf2f6371540e443c6a9ee53acbe68390 (diff) | |
| download | rust-f5db0c7110fc728701444c40a7372f0ea3cd40ce.tar.gz rust-f5db0c7110fc728701444c40a7372f0ea3cd40ce.zip | |
Use renamed atomic intrinsics in panic_unwind
Diffstat (limited to 'library/panic_unwind/src')
| -rw-r--r-- | library/panic_unwind/src/seh.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/library/panic_unwind/src/seh.rs b/library/panic_unwind/src/seh.rs index 9f1eb411ff6..b243333c48e 100644 --- a/library/panic_unwind/src/seh.rs +++ b/library/panic_unwind/src/seh.rs @@ -256,7 +256,7 @@ cfg_if::cfg_if! { } pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 { - use core::intrinsics::atomic_store; + use core::intrinsics::atomic_store_seqcst; // _CxxThrowException executes entirely on this stack frame, so there's no // need to otherwise transfer `data` to the heap. We just pass a stack @@ -288,20 +288,23 @@ pub 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). - atomic_store(&mut THROW_INFO.pmfnUnwind as *mut _ as *mut u32, ptr!(exception_cleanup) as u32); - atomic_store( + atomic_store_seqcst( + &mut THROW_INFO.pmfnUnwind as *mut _ as *mut u32, + ptr!(exception_cleanup) as u32, + ); + atomic_store_seqcst( &mut THROW_INFO.pCatchableTypeArray as *mut _ as *mut u32, ptr!(&CATCHABLE_TYPE_ARRAY as *const _) as u32, ); - atomic_store( + atomic_store_seqcst( &mut CATCHABLE_TYPE_ARRAY.arrayOfCatchableTypes[0] as *mut _ as *mut u32, ptr!(&CATCHABLE_TYPE as *const _) as u32, ); - atomic_store( + atomic_store_seqcst( &mut CATCHABLE_TYPE.pType as *mut _ as *mut u32, ptr!(&TYPE_DESCRIPTOR as *const _) as u32, ); - atomic_store( + atomic_store_seqcst( &mut CATCHABLE_TYPE.copyFunction as *mut _ as *mut u32, ptr!(exception_copy) as u32, ); |
