Added functions to deal with atomic counters.
workspace