Semaphore and Mutex need improvement
Learning use of goto