If scheduler was running, and lock was an auto variable initialised at runtime by _lock_init*, initialisation could fail
if the lock variable held non-zero stack memory (and lock would be left invalid).
In other cases the lock is statically initialised to zero by __LOCK_INIT*