[LOCK]

Add lock structure for shared variables
Merge branch 'develop'