Struct coco::epoch::Atomic [] [src]

pub struct Atomic<T> { /* fields omitted */ }

A tagged atomic nullable pointer.

The tag is stored into the unused least significant bits of the pointer. The pointer must be properly aligned.

Methods

impl<T> Atomic<T>
[src]

Returns a new, null atomic pointer tagged with tag.

Panics

Panics if the tag doesn't fit into the unused bits of an aligned pointer.

Allocates data on the heap and returns a new atomic pointer that points to it and is tagged with tag.

Panics

Panics if the tag doesn't fit into the unused bits of the pointer, or if the allocated pointer is unaligned.

Returns a new atomic pointer initialized with ptr.

Returns a new atomic pointer initialized with b and tag.

Panics

Panics if the tag doesn't fit into the unused bits of the pointer, or if the pointer is unaligned.

Returns a new atomic pointer initialized with raw and tag.

Panics

Panics if the tag doesn't fit into the unused bits of the pointer, or if the pointer is unaligned.

Loads the tagged atomic pointer.

This operation uses the Acquire ordering.

Loads the tagged atomic pointer as a raw pointer and a tag.

Argument order describes the memory ordering of this operation.

Stores new tagged with tag into the atomic.

This operation uses the Release ordering.

Stores new tagged with tag into the atomic and returns it.

This operation uses the Release ordering.

Panics

Panics if the tag doesn't fit into the unused bits of the pointer, or if the pointer is unaligned.

Stores new tagged with tag into the atomic.

Argument order describes the memory ordering of this operation.

Panics

Panics if the tag doesn't fit into the unused bits of the pointer, or if the pointer is unaligned.

Stores new into the atomic, returning the old tagged pointer.

This operation uses the AcqRel ordering.

Stores new tagged with tag into the atomic, returning the old tagged pointer.

This operation uses the AcqRel ordering.

Panics

Panics if the tag doesn't fit into the unused bits of the pointer, or if the pointer is unaligned.

Stores new tagged with tag into the atomic, returning the old tagged pointer.

Argument order describes the memory ordering of this operation.

Panics

Panics if the tag doesn't fit into the unused bits of the pointer, or if the pointer is unaligned.

If the tagged atomic pointer is equal to current, stores new.

The return value is a result indicating whether the new pointer was stored. On failure the current value of the tagged atomic pointer is returned.

This operation uses the AcqRel ordering.

If the tagged atomic pointer is equal to current, stores new tagged with tag.

The return value is a result indicating whether the new pointer was stored. On success the new pointer is returned. On failure the current value of the tagged atomic pointer and new are returned.

This operation uses the AcqRel ordering.

Panics

Panics if the tag doesn't fit into the unused bits of the pointer, or if the pointer is unaligned.

If the tagged atomic pointer is equal to current, stores new.

The return value is a result indicating whether the new pointer was stored. On failure the current value of the tagged atomic pointer is returned.

Argument order describes the memory ordering of this operation.

Panics

Panics if the tag doesn't fit into the unused bits of the pointer, or if the pointer is unaligned.

Trait Implementations

impl<T: Debug> Debug for Atomic<T>
[src]

Formats the value using the given formatter.

impl<T: Send + Sync> Send for Atomic<T>
[src]

impl<T: Send + Sync> Sync for Atomic<T>
[src]

impl<T> Default for Atomic<T>
[src]

Returns the "default value" for a type. Read more