Struct intel_tsx_rtm::HardwareMemoryTransactionManager [] [src]

pub struct HardwareMemoryTransactionManager { /* fields omitted */ }

A simple wrapper to avoid constantly having to check for support of hardware memory transactions.

Methods

impl HardwareMemoryTransactionManager
[src]

[src]

Creates a new instance.

[src]

Gracefully executes the transaction once if TSX transaction are supported. If not supported, returns an Err with None. Use this when executing a transaction for the first time in a loop, then adjust to either TSX specific code (eg calling execute_transaction_once() which will panic if TSX is not supported) or a software transactional manager.

[src]

Executes the transaction once. Panics on non x86_64 platforms. Panics on x86_64 platforms which don't have transactions if running with debug assertions enabled. TransactionCallback returns a status code if it wants to explicitly abort.

[src]

Does this x86_64 CPU have hardware transactions (TSX)? This will always be false for non-x86-64 platforms.

[src]

Use this to detect if inside a transaction callback. Always false if TSX transactions are not supported (eg not x86-64, not a recent Intel Skylake CPU). Can be used to prevent nested transactions, and in code meant to run either as a transaction or in a fallback.

Trait Implementations

impl Debug for HardwareMemoryTransactionManager
[src]

[src]

Formats the value using the given formatter.

impl Copy for HardwareMemoryTransactionManager
[src]

impl Clone for HardwareMemoryTransactionManager
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for HardwareMemoryTransactionManager
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for HardwareMemoryTransactionManager
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Eq for HardwareMemoryTransactionManager
[src]

impl PartialEq for HardwareMemoryTransactionManager
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Hash for HardwareMemoryTransactionManager
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more