Atomic variables can be accessed concurrently between different threads without creating race conditions.
/* a global static variable that is visible by all threads */
static unsigned _Atomic active = ATOMIC_VAR_INIT(0);
int myThread(void* a) {
++active; // increment active race fr...