12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #pragma once
- #include "il2cpp-config.h"
- struct Il2CppObject;
- namespace il2cpp
- {
- namespace vm
- {
- class LIBIL2CPP_CODEGEN_API Monitor
- {
- public:
- static void Enter(Il2CppObject* object);
- static bool TryEnter(Il2CppObject* object, uint32_t timeout);
- static void Exit(Il2CppObject* object);
- static void Pulse(Il2CppObject* object);
- static void PulseAll(Il2CppObject* object);
- static void Wait(Il2CppObject* object);
- static bool TryWait(Il2CppObject* object, uint32_t timeout);
- static bool IsAcquired(Il2CppObject* object);
- };
- #if !IL2CPP_SUPPORT_THREADS
- inline void Monitor::Enter(Il2CppObject* object)
- {
- }
- inline bool Monitor::TryEnter(Il2CppObject* object, uint32_t timeout)
- {
- return true;
- }
- inline void Monitor::Exit(Il2CppObject* object)
- {
- }
- inline void Monitor::Pulse(Il2CppObject* object)
- {
- }
- inline void Monitor::PulseAll(Il2CppObject* object)
- {
- }
- inline void Monitor::Wait(Il2CppObject* object)
- {
- }
- inline bool Monitor::TryWait(Il2CppObject* object, uint32_t timeout)
- {
- return true;
- }
- inline bool Monitor::IsAcquired(Il2CppObject* object)
- {
- return true;
- }
- #endif
- } /* namespace vm */
- } /* namespace il2cpp */
|