#include "threads.h"

int createThread(void* th, void *arg, int *attr) {
  if (hot_thread_Create ((void*) th, arg, (hot_thread_attr_t *) attr) != HOT_OK)
    return -1;
  else return 0;
}

int sleepThread(int microseconds) {
  if (hot_thread_Usleep (microseconds) != HOT_OK)
     return -1;
  else return 0;
}

int yieldThread() {
  if (hot_thread_Yield() != HOT_OK) 
    return -1;
  else return 0;
}
