Added simple class for Semaphore
Put system includes before own includes to make compiler happy