Define atomic_max and atomic_min.