A1Q1a: Added locks in synch.c and sync.h