Reported by Kuo-Lang Tseng:
Use locking mechanism to guard critical regions in the driver API so that the API operation from one thread (task or fiber) can complete without the context being over-written by simultaneous call of the API from other thread (task or fiber).
(Imported from Jira ZEP-424)