Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b8606c82
Commit
b8606c82
authored
Jun 22, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: Added _Lockit class implementation.
parent
00f7683e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
106 additions
and
14 deletions
+106
-14
misc.c
dlls/msvcp90/misc.c
+82
-0
msvcp90.h
dlls/msvcp90/msvcp90.h
+8
-0
msvcp90.spec
dlls/msvcp90/msvcp90.spec
+14
-14
msvcp90_main.c
dlls/msvcp90/msvcp90_main.c
+2
-0
No files found.
dlls/msvcp90/misc.c
View file @
b8606c82
...
...
@@ -90,3 +90,85 @@ void CDECL mutex_mutex_dtor(mutex *m)
{
mutex_dtor
(
m
);
}
#define _LOCK_LOCALE 0
#define _LOCK_MALLOC 1
#define _LOCK_STREAM 2
#define _LOCK_DEBUG 3
#define _MAX_LOCK 4
static
CRITICAL_SECTION
lockit_cs
[
_MAX_LOCK
];
/* ?_Lockit_ctor@_Lockit@std@@SAXH@Z */
void
__cdecl
_Lockit_init
(
int
locktype
)
{
InitializeCriticalSection
(
&
lockit_cs
[
locktype
]);
lockit_cs
[
locktype
].
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": _Lockit critical section"
);
}
/* ?_Lockit_dtor@_Lockit@std@@SAXH@Z */
void
__cdecl
_Lockit_free
(
int
locktype
)
{
lockit_cs
[
locktype
].
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)
0
;
DeleteCriticalSection
(
&
lockit_cs
[
locktype
]);
}
void
init_lockit
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
_MAX_LOCK
;
i
++
)
_Lockit_init
(
i
);
}
void
free_lockit
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
_MAX_LOCK
;
i
++
)
_Lockit_free
(
i
);
}
/* ?_Lockit_ctor@_Lockit@std@@CAXPAV12@H@Z */
/* ?_Lockit_ctor@_Lockit@std@@CAXPEAV12@H@Z */
void
__cdecl
_Lockit__Lockit_ctor_locktype
(
_Lockit
*
lockit
,
int
locktype
)
{
lockit
->
locktype
=
locktype
;
EnterCriticalSection
(
&
lockit_cs
[
locktype
]);
}
/* ?_Lockit_ctor@_Lockit@std@@CAXPAV12@@Z */
/* ?_Lockit_ctor@_Lockit@std@@CAXPEAV12@@Z */
void
__cdecl
_Lockit__Lockit_ctor
(
_Lockit
*
lockit
)
{
_Lockit__Lockit_ctor_locktype
(
lockit
,
0
);
}
/* ??0_Lockit@std@@QAE@H@Z */
/* ??0_Lockit@std@@QEAA@H@Z */
DEFINE_THISCALL_WRAPPER
(
_Lockit_ctor_locktype
,
8
)
_Lockit
*
__thiscall
_Lockit_ctor_locktype
(
_Lockit
*
this
,
int
locktype
)
{
_Lockit__Lockit_ctor_locktype
(
this
,
locktype
);
return
this
;
}
/* ??0_Lockit@std@@QAE@XZ */
/* ??0_Lockit@std@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER
(
_Lockit_ctor
,
4
)
_Lockit
*
__thiscall
_Lockit_ctor
(
_Lockit
*
this
)
{
_Lockit__Lockit_ctor_locktype
(
this
,
0
);
return
this
;
}
/* ?_Lockit_dtor@_Lockit@std@@CAXPAV12@@Z */
/* ?_Lockit_dtor@_Lockit@std@@CAXPEAV12@@Z */
void
__cdecl
_Lockit__Lockit_dtor
(
_Lockit
*
lockit
)
{
LeaveCriticalSection
(
&
lockit_cs
[
lockit
->
locktype
]);
}
/* ??1_Lockit@std@@QAE@XZ */
/* ??1_Lockit@std@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER
(
_Lockit_dtor
,
4
)
void
__thiscall
_Lockit_dtor
(
_Lockit
*
this
)
{
_Lockit__Lockit_dtor
(
this
);
}
dlls/msvcp90/msvcp90.h
View file @
b8606c82
...
...
@@ -193,3 +193,11 @@ typedef struct
{
struct
locale__Locimp
*
ptr
;
}
locale
;
/* class _Lockit */
typedef
struct
{
int
locktype
;
}
_Lockit
;
void
init_lockit
(
void
);
void
free_lockit
(
void
);
dlls/msvcp90/msvcp90.spec
View file @
b8606c82
...
...
@@ -1078,10 +1078,10 @@
@ stub -arch=win64 ??0_Locinfo@std@@QEAA@HPEBD@Z
@ stub -arch=win32 ??0_Locinfo@std@@QAE@PBD@Z
@ stub -arch=win64 ??0_Locinfo@std@@QEAA@PEBD@Z
@
stub -arch=win32 ??0_Lockit@std@@QAE@H@Z
@
stub -arch=win64 ??0_Lockit@std@@QEAA@H@Z
@
stub -arch=win32 ??0_Lockit@std@@QAE@XZ
@
stub -arch=win64 ??0_Lockit@std@@QEAA@XZ
@
thiscall -arch=win32 ??0_Lockit@std@@QAE@H@Z(ptr long) _Lockit_ctor_locktype
@
cdecl -arch=win64 ??0_Lockit@std@@QEAA@H@Z(ptr long) _Lockit_ctor_locktype
@
thiscall -arch=win32 ??0_Lockit@std@@QAE@XZ(ptr) _Lockit_ctor
@
cdecl -arch=win64 ??0_Lockit@std@@QEAA@XZ(ptr) _Lockit_ctor
@ thiscall -arch=win32 ??0_Mutex@std@@QAE@XZ(ptr) mutex_ctor
@ cdecl -arch=win64 ??0_Mutex@std@@QEAA@XZ(ptr) mutex_ctor
@ stub -arch=win32 ??0_Timevec@std@@QAE@ABV01@@Z
...
...
@@ -1316,8 +1316,8 @@
@ cdecl -arch=win64 ??1_Locimp@locale@std@@MEAA@XZ(ptr) locale__Locimp_dtor
@ stub -arch=win32 ??1_Locinfo@std@@QAE@XZ
@ stub -arch=win64 ??1_Locinfo@std@@QEAA@XZ
@
stub -arch=win32 ??1_Lockit@std@@QAE@XZ
@
stub -arch=win64 ??1_Lockit@std@@QEAA@XZ
@
thiscall -arch=win32 ??1_Lockit@std@@QAE@XZ(ptr) _Lockit_dtor
@
cdecl -arch=win64 ??1_Lockit@std@@QEAA@XZ(ptr) _Lockit_dtor
@ thiscall -arch=win32 ??1_Mutex@std@@QAE@XZ(ptr) mutex_dtor
@ cdecl -arch=win64 ??1_Mutex@std@@QEAA@XZ(ptr) mutex_dtor
@ stub -arch=win32 ??1_Timevec@std@@QAE@XZ
...
...
@@ -2599,14 +2599,14 @@
@ stub -arch=win64 ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ
@ thiscall -arch=win32 ?_Lock@_Mutex@std@@QAEXXZ(ptr) mutex_lock
@ cdecl -arch=win64 ?_Lock@_Mutex@std@@QEAAXXZ(ptr) mutex_lock
@
stub -arch=win32 ?_Lockit_ctor@_Lockit@std@@CAXPAV12@@Z
@
stub -arch=win64 ?_Lockit_ctor@_Lockit@std@@CAXPEAV12@@Z
@
stub -arch=win32 ?_Lockit_ctor@_Lockit@std@@CAXPAV12@H@Z
@
stub -arch=win64 ?_Lockit_ctor@_Lockit@std@@CAXPEAV12@H@Z
@
stub ?_Lockit_ctor@_Lockit@std@@SAXH@Z
@
stub -arch=win32 ?_Lockit_dtor@_Lockit@std@@CAXPAV12@@Z
@
stub -arch=win64 ?_Lockit_dtor@_Lockit@std@@CAXPEAV12@@Z
@
stub ?_Lockit_dtor@_Lockit@std@@SAXH@Z
@
cdecl -arch=win32 ?_Lockit_ctor@_Lockit@std@@CAXPAV12@@Z(ptr) _Lockit__Lockit_ctor
@
cdecl -arch=win64 ?_Lockit_ctor@_Lockit@std@@CAXPEAV12@@Z(ptr) _Lockit__Lockit_ctor
@
cdecl -arch=win32 ?_Lockit_ctor@_Lockit@std@@CAXPAV12@H@Z(ptr long) _Lockit__Lockit_ctor_locktype
@
cdecl -arch=win64 ?_Lockit_ctor@_Lockit@std@@CAXPEAV12@H@Z(ptr long) _Lockit__Lockit_ctor_locktype
@
cdecl ?_Lockit_ctor@_Lockit@std@@SAXH@Z(long) _Lockit_init
@
cdecl -arch=win32 ?_Lockit_dtor@_Lockit@std@@CAXPAV12@@Z(ptr) _Lockit__Lockit_dtor
@
cdecl -arch=win64 ?_Lockit_dtor@_Lockit@std@@CAXPEAV12@@Z(ptr) _Lockit__Lockit_dtor
@
cdecl ?_Lockit_dtor@_Lockit@std@@SAXH@Z(long) _Lockit_free
@ stub -arch=win32 ?_MP_Add@tr1@std@@YAXQA_K_K@Z
@ stub -arch=win64 ?_MP_Add@tr1@std@@YAXQEA_K_K@Z
@ stub -arch=win32 ?_MP_Get@tr1@std@@YA_KQA_K@Z
...
...
dlls/msvcp90/msvcp90_main.c
View file @
b8606c82
...
...
@@ -57,8 +57,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
case
DLL_PROCESS_ATTACH
:
init_cxx_funcs
();
set_exception_vtable
();
init_lockit
();
break
;
case
DLL_PROCESS_DETACH
:
free_lockit
();
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment