Man page - ck_pr_cas(3)
Packages contains this manual
- ck_pr_fence_load_atomic(3)
- ck_bitmap_reset(3)
- ck_pr_fas(3)
- ck_pr_bts(3)
- ck_brlock(3)
- ck_array_remove(3)
- ck_hs_init(3)
- ck_pr_xor(3)
- ck_pr_rtm(3)
- ck_epoch_begin(3)
- ck_hs_grow(3)
- ck_bitmap_next(3)
- ck_pr_stall(3)
- ck_hs_destroy(3)
- ck_pr_faa(3)
- ck_pr_btc(3)
- ck_ring_init(3)
- ck_epoch_register(3)
- ck_ht_remove_spmc(3)
- ck_ht_stat(3)
- ck_rhs_iterator_init(3)
- ck_hs_gc(3)
- ck_ring_enqueue_spsc_size(3)
- ck_pr_neg(3)
- ck_rhs_reset(3)
- ck_ht_count(3)
- ck_bitmap_iterator_init(3)
- ck_hs_set(3)
- ck_rwcohort(3)
- ck_ht_destroy(3)
- ck_array_initialized(3)
- ck_rhs_remove(3)
- ck_hs_reset_size(3)
- ck_bitmap_test(3)
- ck_bitmap_set(3)
- ck_sequence(3)
- ck_pr_cas(3)
- ck_ring_size(3)
- ck_pr_store(3)
- ck_hs_rebuild(3)
- ck_pr_fence_release(3)
- ck_ht_entry_key_set_direct(3)
- ck_epoch_reclaim(3)
- ck_pr_add(3)
- ck_hs_put(3)
- ck_array_length(3)
- ck_array_buffer(3)
- ck_bitmap_init(3)
- ck_bitmap_base(3)
- ck_ring_enqueue_spmc_size(3)
- ck_rhs_next(3)
- ck_bitmap_size(3)
- ck_ht_entry_empty(3)
- ck_hs_fas(3)
- ck_pr_fence_store_load(3)
- ck_hs_next(3)
- ck_rhs_grow(3)
- ck_bitmap_clear(3)
- ck_pr_and(3)
- ck_queue(3)
- ck_ht_entry_key_length(3)
- ck_rhs_count(3)
- ck_bitmap_buffer(3)
- ck_ht_entry_key_set(3)
- ck_ht_get_spmc(3)
- ck_pr_fence_atomic_store(3)
- ck_ring_capacity(3)
- ck_ht_set_spmc(3)
- ck_pr_fence_load_depends(3)
- ck_ht_grow_spmc(3)
- ck_pr_fence_acquire(3)
- ck_ht_entry_value(3)
- ck_ht_reset_size_spmc(3)
- ck_bitmap_bits(3)
- ck_rhs_fas(3)
- ck_pr_fence_store_atomic(3)
- ck_ht_hash_direct(3)
- ck_pr_fence_memory(3)
- ck_swlock(3)
- ck_pr(3)
- ck_hs_get(3)
- ck_ht_entry_key(3)
- ck_rhs_rebuild(3)
- ck_array_init(3)
- ck_rhs_gc(3)
- ck_pflock(3)
- ck_ht_entry_set_direct(3)
- ck_ht_entry_value_direct(3)
- ck_epoch_poll(3)
- ck_pr_fence_load(3)
- ck_hs_move(3)
- ck_rhs_set(3)
- ck_epoch_barrier(3)
- ck_rhs_put_unique(3)
- ck_tflock(3)
- ck_pr_fence_atomic_load(3)
- ck_ht_hash(3)
- ck_ring_trydequeue_spmc(3)
- ck_epoch_unregister(3)
- ck_rhs_reset_size(3)
- ck_ht_init(3)
- ck_ht_gc(3)
- ck_rhs_get(3)
- ck_ring_enqueue_spsc(3)
- ck_pr_load(3)
- ck_epoch_synchronize(3)
- ck_pr_or(3)
- ck_pr_sub(3)
- ck_bitmap_union(3)
- ck_cohort(3)
- ck_rhs_move(3)
- ck_hs_reset(3)
- ck_ring_dequeue_spmc(3)
- ck_ht_entry_key_direct(3)
- ck_hs_apply(3)
- ck_pr_dec(3)
- ck_bitmap_bts(3)
- ck_ring_dequeue_spsc(3)
- ck_pr_fence_load_store(3)
- ck_pr_fence_store(3)
- ck_epoch_end(3)
- ck_rhs_put(3)
- ck_rwlock(3)
- ck_rhs_destroy(3)
- ck_pr_inc(3)
- ck_rhs_stat(3)
- ck_hs_iterator_init(3)
- ck_ring_enqueue_spmc(3)
- ck_ht_reset_spmc(3)
- ck_pr_barrier(3)
- ck_epoch_call(3)
- ck_ht_put_spmc(3)
- ck_rhs_apply(3)
- ck_array_commit(3)
- ck_hs_remove(3)
- ck_array_put_unique(3)
- ck_array_deinit(3)
- ck_array_put(3)
- ck_spinlock(3)
- ck_rhs_init(3)
- ck_hs_count(3)
- ck_hs_stat(3)
- ck_pr_btr(3)
- ck_ht_entry_set(3)
- ck_epoch_recycle(3)
- ck_hs_put_unique(3)
- ck_epoch_init(3)
- ck_ht_iterator_init(3)
- ck_pr_fence_atomic(3)
- ck_elide(3)
- ck_pr_not(3)
- ck_ht_next(3)
apt-get install libck-dev
Manual
NAME
ck_pr_cas_ptr, ck_pr_cas_ptr_value, ck_pr_cas_ptr_2, ck_pr_cas_ptr_2_value, ck_pr_cas_double, ck_pr_cas_double_value, ck_pr_cas_char, ck_pr_cas_char_value, ck_pr_cas_uint, ck_pr_cas_uint_value, ck_pr_cas_int, ck_pr_cas_int_value, ck_pr_cas_64_2, ck_pr_cas_64_2_value, ck_pr_cas_64, ck_pr_cas_64_value, ck_pr_cas_32, ck_pr_cas_32_value, ck_pr_cas_16, ck_pr_cas_16_value, ck_pr_cas_8, ck_pr_cas_8_value â atomic compare-and-swap operations
LIBRARY
Concurrency Kit (libck, -lck)
SYNOPSIS
#include <ck_pr.h>
bool
ck_pr_cas_ptr ( void *target , void *old_value , void *new_value );
bool
ck_pr_cas_ptr_value ( void *target , void *old_value , void *new_value , void *original_value );
bool
ck_pr_cas_ptr_2 ( void *target , void *old_value , void *new_value );
bool
ck_pr_cas_ptr_2_value ( void *target , void *old_value , void *new_value , void *original_value );
bool
ck_pr_cas_double ( double *target , double old_value , double new_value );
bool
ck_pr_cas_double_value ( double *target , double old_value , double new_value , double *original_value );
bool
ck_pr_cas_char ( char *target , char old_value , char new_value );
bool
ck_pr_cas_char_value ( char *target , char old_value , char new_value , char *original_value );
bool
ck_pr_cas_uint ( unsigned int *target , unsigned int old_value , unsigned int new_value );
bool
ck_pr_cas_uint_value ( unsigned int *target , unsigned int old_value , unsigned int new_value , unsigned int *original_value );
bool
ck_pr_cas_int ( int *target , int old_value , int new_value );
bool
ck_pr_cas_int_value ( int *target , int old_value , int new_value , int *original_value );
bool
ck_pr_cas_64_2 ( uint64_t target[static 2] , uint64_t old_value[static 2] , uint64_t new_value[static 2] );
bool
ck_pr_cas_64_2_value ( uint64_t target[static 2] , uint64_t old_value[static 2] , uint64_t new_value[static 2] , uint64_t original_value[static 2] );
bool
ck_pr_cas_64 ( uint64_t *target , uint64_t old_value , uint64_t new_value );
bool
ck_pr_cas_64_value ( uint64_t *target , uint64_t old_value , uint64_t new_value , uint64_t *original_value );
bool
ck_pr_cas_32 ( uint32_t *target , uint32_t old_value , uint32_t new_value );
bool
ck_pr_cas_32_value ( uint32_t *target , uint32_t old_value , uint32_t new_value , uint32_t *original_value );
bool
ck_pr_cas_16 ( uint16_t *target , uint16_t old_value , uint16_t new_value );
bool
ck_pr_cas_16_value ( uint16_t *target , uint16_t old_value , uint16_t new_value , uint16_t *original_value );
bool
ck_pr_cas_8 ( uint8_t *target , uint8_t old_value , uint8_t new_value );
bool
ck_pr_cas_8_value ( uint8_t *target , uint8_t old_value , uint8_t new_value , uint8_t *original_value );
DESCRIPTION
The ck_pr_cas ( 3 ) family of functions atomically compare the value in target for equality with old_value and if so, replace the value pointed to by target with the value specified by new_value . If the value in target was not equal to the value specified by old_value then no modifications occur to the value in target . The *_value form of these functions unconditionally update original_value .
RETURN VALUES
This family of functions return true if the value in target was modified as a result of the operation. Otherwise, they return false.
SEE ALSO
ck_pr_fence_load (3), ck_pr_fence_load_depends (3), ck_pr_fence_store (3), ck_pr_fence_memory (3), ck_pr_load (3), ck_pr_store (3), ck_pr_fas (3), ck_pr_faa (3), ck_pr_inc (3), ck_pr_dec (3), ck_pr_neg (3), ck_pr_not (3), ck_pr_sub (3), ck_pr_and (3), ck_pr_or (3), ck_pr_xor (3), ck_pr_add (3), ck_pr_btc (3), ck_pr_bts (3), ck_pr_btr (3)
Additional information available at http://concurrencykit.org/ April 11, 2013 ck_pr_cas (3)