Replaced use of lock in AddDatPar with an atomic operation in assembly.