Use new atomic function for transactions.

Change-Id: I18d82f74a9492fbd2a847015d13fe2ff8bacbd9f