Quantcast
Channel: Assigning pointers to atomic type to pointers to non atomic type - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Petr Skocik for Assigning pointers to atomic type to pointers to...

6.2.5p27:Further, there is the _Atomic qualifier. The presence of the _Atomic qualifier designates an atomic type. The size, representation, and alignment of an atomic type need not be the same as...

View Article



Answer by Peter Cordes for Assigning pointers to atomic type to pointers to...

C11 allows _Atomic T to have a different size and layout than T, e.g. if it's not lock-free. (See @PSkocik's answer).For example, the implementation could choose to put a mutex inside each atomic...

View Article

Assigning pointers to atomic type to pointers to non atomic type

Is the behavior of this code well-defined?#include <stdatomic.h>const int test = 42;const int * _Atomic atomic_int_ptr;atomic_init(&atomic_int_ptr, &test);const int ** int_ptr_ptr =...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images