API for a generic semaphore implementation that allows initialisation with negative values