#include "semaphore.h"

int createSemaphore (int initValue, semaphore *s) {
  if (hot_sema_Create (initValue, s) != HOT_OK)
    return -1;
  else return 0;
}


int incSemaphore (semaphore *s) {
  if (hot_sema_Inc (*s) != HOT_OK) 
    return -1;
  else return 0;
}

int decSemaphore (semaphore *s) {
  if (hot_sema_Dec (*s) != HOT_OK) 
    return -1;
  else return 0;
}
