using atomic operations for mutual exclusion 182232