Update car.c

Implement locking using semaphore
Merge pull request #1 from kgcorner/semaphore

Update car.c