Semaphore.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <stdint.h>
  3. #include "il2cpp-config.h"
  4. #include "il2cpp-object-internals.h"
  5. struct Il2CppString;
  6. namespace il2cpp
  7. {
  8. namespace icalls
  9. {
  10. namespace System
  11. {
  12. namespace System
  13. {
  14. namespace Threading
  15. {
  16. class LIBIL2CPP_CODEGEN_API Semaphore
  17. {
  18. public:
  19. #if !NET_4_0
  20. static intptr_t CreateSemaphore_internal(int32_t initialCount, int32_t maximumCount, Il2CppString* name, bool* created);
  21. static int32_t ReleaseSemaphore_internal(intptr_t handlePtr, int32_t releaseCount, bool* fail);
  22. #else
  23. static intptr_t CreateSemaphore_internal40(int32_t initialCount, int32_t maximumCount, Il2CppString* name, int32_t* errorCode);
  24. static bool ReleaseSemaphore_internal40(intptr_t handlePtr, int32_t releaseCount, int32_t* previousCount);
  25. #endif
  26. static intptr_t OpenSemaphore_internal(Il2CppString* name, int32_t rights, int32_t* error);
  27. };
  28. } /* namespace Threading */
  29. } /* namespace System */
  30. } /* namespace System */
  31. } /* namespace icalls */
  32. } /* namespace il2cpp */