passing lock by pointer to lock_acquire/lock_release.