Fix race conditions

progBal problem didn't cause probles because the value written
to the same value on each thread. mdatom.c (c6/c12) problem
was introduced in commit 1c4ab8dc85d1b.

Change-Id: Ia61d214f82771b181308573e4ae1adac94ce5ffa