qThreadWrapper.h 497 B

123456789101112131415161718192021222324252627
  1. #ifndef QTHREADWRAPPER_H
  2. #define QTHREADWRAPPER_H
  3. typedef void* Thread;
  4. typedef void*(*ThreadFunction)(void*);
  5. typedef void* ThreadArgument;
  6. #ifdef __cplusplus
  7. extern "C"
  8. {
  9. #endif
  10. // Creates a thread that calls thread_func
  11. Thread createThread(ThreadFunction func, ThreadArgument arg);
  12. // Causes the current thread to sleep
  13. void sleepThread(Thread thread, unsigned long usec);
  14. // Destroy thread
  15. void destroyThread(Thread thread);
  16. #ifdef __cplusplus
  17. }
  18. #endif
  19. #endif