Added semaphores to protect the shared variables in SemaphoreBarrier.
Added javadoc.
Merge branch 'master' of https://github.com/prasopes/02158-assignment