macros.h: added a semaphore typedef to make it easier to change the semaphore type later