Some basic synchronization primitives.