SemaphoreImpl.h 459 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #if IL2CPP_THREADS_PTHREAD
  3. #include "PosixWaitObject.h"
  4. #include "os/ErrorCodes.h"
  5. #include "os/WaitStatus.h"
  6. #include <semaphore.h>
  7. namespace il2cpp
  8. {
  9. namespace os
  10. {
  11. class SemaphoreImpl : public posix::PosixWaitObject
  12. {
  13. public:
  14. SemaphoreImpl(int32_t initialValue, int32_t maximumValue);
  15. bool Post(int32_t releaseCount, int32_t* previousCount);
  16. protected:
  17. uint32_t m_MaximumValue;
  18. };
  19. }
  20. }
  21. #endif