Crate intel_tsx_hle [] [src]

intel-tsx-hle

This crate provides atomic intrinsics for HLE (Hardware Lock Elision) on some Intel Skylake CPUs in 32-bit (x86) and 64-bit (x86_64) modes. The naming of the intrinsics follows that in Andi Kleen's tsx-tools. Intrinsics are available for u8, u16, u32, and, for x86_64, u64. These intrinsics can be thought of as providing additional memory orderings to Rust's Relaxed, Release, Acquire and SeqCst. They closely model the intent of GCC's built in atomic instrincs.

Functions

__hle_acquire_add1

Atomically add val to the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_add2

Atomically add val to the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_add4

Atomically add val to the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_add_fetch1

Atomically add val to the content of ptr and return the result with 'HLE Acquire' memory ordering.

__hle_acquire_add_fetch2

Atomically add val to the content of ptr and return the result with 'HLE Acquire' memory ordering.

__hle_acquire_add_fetch4

Atomically add val to the content of ptr and return the result with 'HLE Acquire' memory ordering.

__hle_acquire_and1

Atomically AND val with the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_and2

Atomically AND val with the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_and4

Atomically AND val with the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_clear1

Atomically clear the content of ptr, ie set the content of ptr to zero with 'HLE Acquire' memory ordering.

__hle_acquire_clear2

Atomically clear the content of ptr, ie set the content of ptr to zero with 'HLE Acquire' memory ordering.

__hle_acquire_clear4

Atomically clear the content of ptr, ie set the content of ptr to zero with 'HLE Acquire' memory ordering.

__hle_acquire_compare_exchange_n1

Atomically compare-and-swap with 'HLE Acquire' memory ordering. This compares the content of ptr with the content of oldp:- * If equal, the function atomically writes newv into ptr and returns true. * If they are not equal, the function atomically writes the content of ptr into oldp and returns false Since this is only for the x86 / x86_64 architecture, there is no weak variant.

__hle_acquire_compare_exchange_n2

Atomically compare-and-swap with 'HLE Acquire' memory ordering. This compares the content of ptr with the content of oldp:- * If equal, the function atomically writes newv into ptr and returns true. * If they are not equal, the function atomically writes the content of ptr into oldp and returns false Since this is only for the x86 / x86_64 architecture, there is no weak variant.

__hle_acquire_compare_exchange_n4

Atomically compare-and-swap with 'HLE Acquire' memory ordering. This compares the content of ptr with the content of oldp:- * If equal, the function atomically writes newv into ptr and returns true. * If they are not equal, the function atomically writes the content of ptr into oldp and returns false Since this is only for the x86 / x86_64 architecture, there is no weak variant.

__hle_acquire_exchange_n1

Atomically exchange (swap) val for the content of ptr and return the previous content of ptr with 'HLE Acquire' memory ordering.

__hle_acquire_exchange_n2

Atomically exchange (swap) val for the content of ptr and return the previous content of ptr with 'HLE Acquire' memory ordering.

__hle_acquire_exchange_n4

Atomically exchange (swap) val for the content of ptr and return the previous content of ptr with 'HLE Acquire' memory ordering.

__hle_acquire_fetch_add1

Atomically add val to the content of ptr and return the previous content of ptr with 'HLE Acquire' memory ordering.

__hle_acquire_fetch_add2

Atomically add val to the content of ptr and return the previous content of ptr with 'HLE Acquire' memory ordering.

__hle_acquire_fetch_add4

Atomically add val to the content of ptr and return the previous content of ptr with 'HLE Acquire' memory ordering.

__hle_acquire_fetch_sub1

Atomically subtract val from the content of ptr and return the previous content of ptr with 'HLE Acquire' memory ordering.

__hle_acquire_fetch_sub2

Atomically subtract val from the content of ptr and return the previous content of ptr with 'HLE Acquire' memory ordering.

__hle_acquire_fetch_sub4

Atomically subtract val from the content of ptr and return the previous content of ptr with 'HLE Acquire' memory ordering.

__hle_acquire_or1

Atomically OR val with the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_or2

Atomically OR val with the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_or4

Atomically OR val with the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_store_n1

Atomically store (set) the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_store_n2

Atomically store (set) the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_store_n4

Atomically store (set) the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_sub1

Atomically subtract val from the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_sub2

Atomically subtract val from the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_sub4

Atomically subtract val from the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_sub_fetch1

Atomically subtract val from the content of ptr and return the result with 'HLE Acquire' memory ordering.

__hle_acquire_sub_fetch2

Atomically subtract val from the content of ptr and return the result with 'HLE Acquire' memory ordering.

__hle_acquire_sub_fetch4

Atomically subtract val from the content of ptr and return the result with 'HLE Acquire' memory ordering.

__hle_acquire_test_and_set1

Atomically exchange (swap) 1 for the content of ptr and test the previous content of of ptr was 1 with 'HLE Acquire' memory ordering.

__hle_acquire_test_and_set2

Atomically exchange (swap) 1 for the content of ptr and test the previous content of of ptr was 1 with 'HLE Acquire' memory ordering.

__hle_acquire_test_and_set4

Atomically exchange (swap) 1 for the content of ptr and test the previous content of of ptr was 1 with 'HLE Acquire' memory ordering.

__hle_acquire_xor1

Atomically XOR val with the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_xor2

Atomically XOR val with the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_acquire_xor4

Atomically XOR val with the content of ptr to val with 'HLE Acquire' memory ordering.

__hle_release_add1

Atomically add val to the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_add2

Atomically add val to the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_add4

Atomically add val to the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_add_fetch1

Atomically add val to the content of ptr and return the result with 'HLE Release' memory ordering.

__hle_release_add_fetch2

Atomically add val to the content of ptr and return the result with 'HLE Release' memory ordering.

__hle_release_add_fetch4

Atomically add val to the content of ptr and return the result with 'HLE Release' memory ordering.

__hle_release_and1

Atomically AND val with the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_and2

Atomically AND val with the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_and4

Atomically AND val with the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_clear1

Atomically clear the content of ptr, ie set the content of ptr to zero with 'HLE Release' memory ordering.

__hle_release_clear2

Atomically clear the content of ptr, ie set the content of ptr to zero with 'HLE Release' memory ordering.

__hle_release_clear4

Atomically clear the content of ptr, ie set the content of ptr to zero with 'HLE Release' memory ordering.

__hle_release_compare_exchange_n1

Atomically compare-and-swap with 'HLE Release' memory ordering. This compares the content of ptr with the content of oldp:- * If equal, the function atomically writes newv into ptr and returns true. * If they are not equal, the function atomically writes the content of ptr into oldp and returns false Since this is only for the x86 / x86_64 architecture, there is no weak variant.

__hle_release_compare_exchange_n2

Atomically compare-and-swap with 'HLE Release' memory ordering. This compares the content of ptr with the content of oldp:- * If equal, the function atomically writes newv into ptr and returns true. * If they are not equal, the function atomically writes the content of ptr into oldp and returns false Since this is only for the x86 / x86_64 architecture, there is no weak variant.

__hle_release_compare_exchange_n4

Atomically compare-and-swap with 'HLE Release' memory ordering. This compares the content of ptr with the content of oldp:- * If equal, the function atomically writes newv into ptr and returns true. * If they are not equal, the function atomically writes the content of ptr into oldp and returns false Since this is only for the x86 / x86_64 architecture, there is no weak variant.

__hle_release_exchange_n1

Atomically exchange (swap) val for the content of ptr and return the previous content of of ptr with 'HLE Release' memory ordering.

__hle_release_exchange_n2

Atomically exchange (swap) val for the content of ptr and return the previous content of of ptr with 'HLE Release' memory ordering.

__hle_release_exchange_n4

Atomically exchange (swap) val for the content of ptr and return the previous content of of ptr with 'HLE Release' memory ordering.

__hle_release_fetch_add1

Atomically add val to the content of ptr and return the previous content of ptr with 'HLE Release' memory ordering.

__hle_release_fetch_add2

Atomically add val to the content of ptr and return the previous content of ptr with 'HLE Release' memory ordering.

__hle_release_fetch_add4

Atomically add val to the content of ptr and return the previous content of ptr with 'HLE Release' memory ordering.

__hle_release_fetch_sub1

Atomically subtract val from the content of ptr and return the previous content of ptr with 'HLE Release' memory ordering.

__hle_release_fetch_sub2

Atomically subtract val from the content of ptr and return the previous content of ptr with 'HLE Release' memory ordering.

__hle_release_fetch_sub4

Atomically subtract val from the content of ptr and return the previous content of ptr with 'HLE Release' memory ordering.

__hle_release_or1

Atomically OR val with the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_or2

Atomically OR val with the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_or4

Atomically OR val with the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_store_n1

Atomically store (set) the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_store_n2

Atomically store (set) the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_store_n4

Atomically store (set) the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_sub1

Atomically subtract val from the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_sub2

Atomically subtract val from the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_sub4

Atomically subtract val from the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_sub_fetch1

Atomically subtract val from the content of ptr and return the result with 'HLE Release' memory ordering.

__hle_release_sub_fetch2

Atomically subtract val from the content of ptr and return the result with 'HLE Release' memory ordering.

__hle_release_sub_fetch4

Atomically subtract val from the content of ptr and return the result with 'HLE Release' memory ordering.

__hle_release_test_and_set1

Atomically exchange (swap) 1 for the content of ptr and test the previous content of of ptr was 1 with 'HLE Release' memory ordering.

__hle_release_test_and_set2

Atomically exchange (swap) 1 for the content of ptr and test the previous content of of ptr was 1 with 'HLE Release' memory ordering.

__hle_release_test_and_set4

Atomically exchange (swap) 1 for the content of ptr and test the previous content of of ptr was 1 with 'HLE Release' memory ordering.

__hle_release_xor1

Atomically XOR val with the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_xor2

Atomically XOR val with the content of ptr to val with 'HLE Release' memory ordering.

__hle_release_xor4

Atomically XOR val with the content of ptr to val with 'HLE Release' memory ordering.