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.

27 lines
343 B

12 months ago
  1. #pragma once
  2. #include "zbasic.h"
  3. namespace iflytop {
  4. class zmutex {
  5. public:
  6. SemaphoreHandle_t recursiveMutex;
  7. public:
  8. zmutex();
  9. ~zmutex();
  10. void init();
  11. bool isInit();
  12. void lock();
  13. void unlock();
  14. };
  15. class zlock_guard {
  16. zmutex& m_mutex;
  17. public:
  18. zlock_guard(zmutex& mutex);
  19. ~zlock_guard();
  20. };
  21. } // namespace iflytop