Use mutex from the pthread lib
Use mutex from the pthread lib