Skip to main content

PAtomicI64

Struct PAtomicI64 

Source
pub struct PAtomicI64 { /* private fields */ }

Implementations§

Source§

impl PAtomicI64

Source

pub fn from_ptr_store( ptr: *mut i64, value: i64, verus_tmp_perm: Tracked<&mut PointsTo<i64>>, )

Store a value via a raw pointer using atomic store.

This is useful if a user wants to implement lockless algorithm for a struct where elements are linked through pointers. In that case, PointsTo<$value_ty> might be stored in AtomicInvariant.

The specification is similar to raw_ptr::ptr_mut_ref, but the implementation is atomic and so we can mark it as verifier::atomic, and so it can be used in open_atomic_invariant!.

Source

pub fn from_ptr_load(ptr: *mut i64, perm: Tracked<&PointsTo<i64>>) -> i64

Create a copy of the value via atomic load.

Source

pub fn from_ptr_swap( ptr: *mut i64, verus_tmp_perm: Tracked<&mut PointsTo<i64>>, v: i64, ) -> i64

Swap the value via atomic swap.

The swap reads the old value, so the memory must already be initialized; it writes v, so it is initialized on return.

Source§

impl PAtomicI64

Source

pub const fn new(i: i64) -> (PAtomicI64, Tracked<PermissionI64>)

Source

pub fn load(&self, verus_tmp_perm: Tracked<&PermissionI64>) -> i64

Source

pub fn store(&self, verus_tmp_perm: Tracked<&mut PermissionI64>, v: i64)

Source

pub fn compare_exchange( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, current: i64, new: i64, ) -> Result<i64, i64>

Source

pub fn compare_exchange_weak( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, current: i64, new: i64, ) -> Result<i64, i64>

Source

pub fn swap(&self, verus_tmp_perm: Tracked<&mut PermissionI64>, v: i64) -> i64

Source

pub fn into_inner(self, verus_tmp_perm: Tracked<PermissionI64>) -> i64

Source

pub fn fetch_add_wrapping( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Source

pub fn fetch_sub_wrapping( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Source

pub fn fetch_add( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Source

pub fn fetch_sub( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Source

pub fn fetch_and( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Source

pub fn fetch_or( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Source

pub fn fetch_xor( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Source

pub fn fetch_nand( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Source

pub fn fetch_max( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Source

pub fn fetch_min( &self, verus_tmp_perm: Tracked<&mut PermissionI64>, n: i64, ) -> i64

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.