First three lock implementations from 'Mutual Exclusion'. TODO: test them :), fix:current thread id