少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "il2cpp-config.h"
#include "icalls/mscorlib/System.Threading/Mutex.h"
#include "os/Mutex.h"
#include "vm/Exception.h"
 
namespace il2cpp
{
namespace icalls
{
namespace mscorlib
{
namespace System
{
namespace Threading
{
    intptr_t Mutex::CreateMutex_internal(bool initiallyOwned, Il2CppString* name, bool* created)
    {
        *created = true;
        il2cpp::os::Mutex* mutex = NULL;
 
        if (name == NULL)
        {
            mutex = new il2cpp::os::Mutex();
        }
        else
        {
            NOT_SUPPORTED_IL2CPP(Mutex::CreateMutex_internal, "Named mutexes are not supported");
        }
 
        if (initiallyOwned)
            mutex->Lock();
 
        return reinterpret_cast<intptr_t>(new il2cpp::os::MutexHandle(mutex));
    }
 
    bool Mutex::ReleaseMutex_internal(intptr_t handle)
    {
        il2cpp::os::MutexHandle* mutex = (il2cpp::os::MutexHandle*)handle;
        mutex->Get()->Unlock();
        return true;
    }
 
    intptr_t Mutex::OpenMutex_internal(Il2CppString* name, MutexRights rights, MonoIOError* error)
    {
        IL2CPP_NOT_IMPLEMENTED_ICALL(Mutex::OpenMutex_internal);
 
        return intptr_t();
    }
} /* namespace Threading */
} /* namespace System */
} /* namespace mscorlib */
} /* namespace icalls */
} /* namespace il2cpp */