Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P228
atomic_* test, builds and links fine on i386
Active
Public
Actions
Authored by
mmokhi
on Oct 14 2018, 2:03 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
theraven
,
mmokhi
#include <stdint.h>
#include <stdatomic.h>
int main (int argc, char **argv)
{
uint64_t ull1 = 1, ull2 = 0, ull3 = 2;
__atomic_load_n(&ull1, __ATOMIC_SEQ_CST);
__atomic_compare_exchange(&ull1, &ull2, &ull3, 1, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
__atomic_fetch_add(&ull1, 1, __ATOMIC_SEQ_CST);
__atomic_fetch_sub(&ull1, 1, __ATOMIC_SEQ_CST);
__atomic_or_fetch(&ull1, ull2, __ATOMIC_SEQ_CST);
__atomic_and_fetch(&ull1, ull2, __ATOMIC_SEQ_CST);
return 0;
}
Event Timeline
mmokhi
created this paste.
Oct 14 2018, 2:03 PM
mmokhi
created this object in space
S1 Global
.
Log In to Comment