Quantcast
Channel: UNIX Portable Atomic Operations - Stack Overflow
Viewing all articles
Browse latest Browse all 8

UNIX Portable Atomic Operations

$
0
0

Is there a (POSIX-)portable way in C for atomic variable operations similar to a portable threading with pthread?

Atomic operations are operations like "increment and get" that are executed atomically that means that no context switch can interfere with the operation. In Linux kernel space, we have to atomic_t type, in Java we have the java.util.concurrent.atomic package.

On Linux, the atomic.h file provides atomic operations, but the include is platform dependent e.g. #include <asm-x86_64/atomic.h> and it is not available on Mac OS X in a similar way.


Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles





Latest Images