work on Synchronization / Lock structures

Okay, so now the processes should work. Nominally. They tend to crash and
go out in a blaze of corrupted registers though.