added atomic code for entering critical section
Merge branch 'development'