Programming - Locks and Barriers in OpenMP