2 * Copyright 2010 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
33 /* ??0_Mutex@std@@QAE@XZ */
34 /* ??0_Mutex@std@@QEAA@XZ */
35 DEFINE_THISCALL_WRAPPER(mutex_ctor, 4)
36 mutex* __thiscall mutex_ctor(mutex *this)
38 this->mutex = CreateMutexW(NULL, FALSE, NULL);
42 /* ??1_Mutex@std@@QAE@XZ */
43 /* ??1_Mutex@std@@QEAA@XZ */
44 DEFINE_THISCALL_WRAPPER(mutex_dtor, 4)
45 void __thiscall mutex_dtor(mutex *this)
47 CloseHandle(this->mutex);
50 /* ?_Lock@_Mutex@std@@QAEXXZ */
51 /* ?_Lock@_Mutex@std@@QEAAXXZ */
52 DEFINE_THISCALL_WRAPPER(mutex_lock, 4)
53 void __thiscall mutex_lock(mutex *this)
55 WaitForSingleObject(this->mutex, INFINITE);
58 /* ?_Unlock@_Mutex@std@@QAEXXZ */
59 /* ?_Unlock@_Mutex@std@@QEAAXXZ */
60 DEFINE_THISCALL_WRAPPER(mutex_unlock, 4)
61 void __thiscall mutex_unlock(mutex *this)
63 ReleaseMutex(this->mutex);
66 /* ?_Mutex_Lock@_Mutex@std@@CAXPAV12@@Z */
67 /* ?_Mutex_Lock@_Mutex@std@@CAXPEAV12@@Z */
68 void CDECL mutex_mutex_lock(mutex *m)
73 /* ?_Mutex_Unlock@_Mutex@std@@CAXPAV12@@Z */
74 /* ?_Mutex_Unlock@_Mutex@std@@CAXPEAV12@@Z */
75 void CDECL mutex_mutex_unlock(mutex *m)
80 /* ?_Mutex_ctor@_Mutex@std@@CAXPAV12@@Z */
81 /* ?_Mutex_ctor@_Mutex@std@@CAXPEAV12@@Z */
82 void CDECL mutex_mutex_ctor(mutex *m)
87 /* ?_Mutex_dtor@_Mutex@std@@CAXPAV12@@Z */
88 /* ?_Mutex_dtor@_Mutex@std@@CAXPEAV12@@Z */
89 void CDECL mutex_mutex_dtor(mutex *m)