ThreadLocalValueImpl.h 451 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #if IL2CPP_THREADS_PTHREAD
  3. #include "os/ErrorCodes.h"
  4. #include "utils/NonCopyable.h"
  5. #include <pthread.h>
  6. namespace il2cpp
  7. {
  8. namespace os
  9. {
  10. class ThreadLocalValueImpl : public il2cpp::utils::NonCopyable
  11. {
  12. public:
  13. ThreadLocalValueImpl();
  14. ~ThreadLocalValueImpl();
  15. ErrorCode SetValue(void* value);
  16. ErrorCode GetValue(void** value);
  17. private:
  18. pthread_key_t m_Key;
  19. };
  20. }
  21. }
  22. #endif