~alecgraves/haatomic

add COPYING
initial commit

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~alecgraves/haatomic
read/write
git@git.sr.ht:~alecgraves/haatomic

You can also use your local clone with git send-email.

#hatomic

This is a (hopefully) cross-platform library for memory fence operations for shared memory multiprocessing environments.

This library provides the following C-ABI function:

// Memory fence operations
void haatomic_load_fence(void);
void haatomic_store_fence(void);
void haatomic_full_fence(void);

// Compare and swap for 64-bit integers
// Returns 1 if successful, 0 if failed
// *ptr is the target memory location
// expected is the value we expect to find
// new_value is what we want to write if expected matches
int haatomic_cas_i64(int64_t* ptr, int64_t expected, int64_t new_value);

#Build

make ARCH=x86_64
make install INSTALL=<install_path (e.g. "/usr/local")>
Do not follow this link