NVIDIA interview question

how do you implement a lock/unlock parallel process using mutex?