**_Reported by Kuo-Lang Tseng:_** Use locking mechanism to guard critical regions in the driver API so that it will allow the driver to be safe from fibers and task. (Imported from Jira ZEP-414)