shared-mem-locks: correct initialisation sequence