You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
464 B

2 years ago
2 years ago
2 years ago
  1. #pragma once
  2. #include "osbasic_h.hpp"
  3. namespace iflytop {
  4. class ZOSThread {
  5. osThreadId _defaultTaskHandle;
  6. int _stack_size;
  7. osPriority _priority;
  8. function<void()> _func;
  9. const char* _threadname;
  10. public:
  11. void init(const char* threadname, int stack_size = 1024, osPriority priority = osPriorityNormal);
  12. void run(function<void()> func);
  13. void waitingForStop();
  14. public:
  15. void __callfunc();
  16. };
  17. } // namespace iflytop