#ifndef SEMAPHORES_H
#define SEMAPHORES_H

/*
 * semaphores.c and this header file:
 * here are just some nice wrappers to encapsulate the
 * native semaphore functions
 * we don't need the most functionality...
 */
int createSemaphore();
int deleteSemaphore(int semaphoreId);
int initSemaphore(int semaphoreId, int initValue);

/* up: release/increment a semaphore */
void semaphoreUp(int semaphoreId);
/* down: acquire/decrement a semaphore */
void semaphoreDown(int semaphoreId);

/* you need to implement this to bring down your app. will be called if an error occours */
extern void shutdown(int signal);

#endif

