Top "Atomic" questions

An atomic operation is indivisible.

What are atomic operations for newbies?

I am a newbie to operating systems and every answer I've found on Stackoverflow is so complicated that I am …

multithreading concurrency operating-system synchronization atomic
error : identifier "atomicAdd" is undefined under visual studio 2010 & cuda 4.2 with Fermi GPU

I was trying to compile some CUDA codes under visual studio 2010 with CUDA 4.2 (I created this CUDA project using Parallel …

visual-studio-2010 cuda atomic gpu-atomics
Error with copy constructor/assignment operator for a class which has std::atomic member variable

I have a class like below. #include <atomic> static const long myValue = 0; class Sequence { public: Sequence(long initial_…

c++ multithreading c++11 atomic
Can num++ be atomic for 'int num'?

In general, for int num, num++ (or ++num), as a read-modify-write operation, is not atomic. But I often see compilers, …

c++ c multithreading assembly atomic
Which CPU architectures support Compare And Swap (CAS)?

just curious to know which CPU architectures support compare and swap atomic primitives?

multithreading multicore atomic cpu-architecture
Are atomic variables lock-free?

When we talk about atomic variables, such as C++11's atomic<>, is it lock free? Or is lock-freeness …

c++ multithreading c++11 x86-64 atomic
atomic swap with CAS (using gcc sync builtins)

Can the compare-and-swap function be used to swap variables atomically? I'm using C/C++ via gcc on x86_64 RedHat Linux, …

c++ gcc linked-list atomic compare-and-swap
SQL atomic increment and locking strategies - is this safe?

I have a question about SQL and locking strategies. As an example, suppose I have a view counter for the …

sql locking atomic increment
Atomic UPSERT in SQL Server 2005

What is the correct pattern for doing an atomic "UPSERT" (UPDATE where exists, INSERT otherwise) in SQL Server 2005? I see …

sql-server sql-server-2005 atomic upsert
Why isn't atomic double fully implemented

My question is quite simple. Why isn't std::atomic<double> implemented completely? I know it has to do …

c++ floating-point atomic compare-and-swap stdatomic