Added abstraction of operating system semaphores.
whitespace fix.
Make position manager compile on host.