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
8536af68
Commit
8536af68
authored
Jan 21, 2024
by
Daniel Lehman
Committed by
Alexandre Julliard
Jan 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp140: Pad _Mtx_t struct to match Windows.
parent
c3ee5751
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
msvcp140.c
dlls/msvcp140/tests/msvcp140.c
+31
-0
misc.c
dlls/msvcp90/misc.c
+3
-0
No files found.
dlls/msvcp140/tests/msvcp140.c
View file @
8536af68
...
...
@@ -168,6 +168,7 @@ typedef struct
{
DWORD
flags
;
critical_section
cs
;
ULONG_PTR
unknown
;
DWORD
thread_id
;
DWORD
count
;
}
*
_Mtx_t
;
...
...
@@ -1640,6 +1641,35 @@ static void test_Copy_file(void)
ok
(
SetCurrentDirectoryW
(
origin_path
),
"SetCurrentDirectoryW to origin_path failed
\n
"
);
}
static
void
test__Mtx
(
void
)
{
_Mtx_t
mtx
=
NULL
;
int
r
;
r
=
p__Mtx_init
(
&
mtx
,
0
);
ok
(
!
r
,
"failed to init mtx
\n
"
);
ok
(
mtx
->
thread_id
==
-
1
,
"mtx.thread_id = %lx
\n
"
,
mtx
->
thread_id
);
ok
(
mtx
->
count
==
0
,
"mtx.count = %lx
\n
"
,
mtx
->
count
);
p__Mtx_lock
(
mtx
);
ok
(
mtx
->
thread_id
==
GetCurrentThreadId
(),
"mtx.thread_id = %lx
\n
"
,
mtx
->
thread_id
);
ok
(
mtx
->
count
==
1
,
"mtx.count = %lx
\n
"
,
mtx
->
count
);
p__Mtx_lock
(
mtx
);
ok
(
mtx
->
thread_id
==
GetCurrentThreadId
(),
"mtx.thread_id = %lx
\n
"
,
mtx
->
thread_id
);
ok
(
mtx
->
count
==
1
,
"mtx.count = %lx
\n
"
,
mtx
->
count
);
p__Mtx_unlock
(
mtx
);
ok
(
mtx
->
thread_id
==
-
1
,
"mtx.thread_id = %lx
\n
"
,
mtx
->
thread_id
);
ok
(
mtx
->
count
==
0
,
"mtx.count = %lx
\n
"
,
mtx
->
count
);
p__Mtx_unlock
(
mtx
);
ok
(
mtx
->
thread_id
==
-
1
,
"mtx.thread_id = %lx
\n
"
,
mtx
->
thread_id
);
ok
(
mtx
->
count
==
-
1
,
"mtx.count = %lx
\n
"
,
mtx
->
count
);
p__Mtx_unlock
(
mtx
);
ok
(
mtx
->
thread_id
==
-
1
,
"mtx.thread_id = %lx
\n
"
,
mtx
->
thread_id
);
ok
(
mtx
->
count
==
-
2
,
"mtx.count = %lx
\n
"
,
mtx
->
count
);
p__Mtx_destroy
(
mtx
);
}
START_TEST
(
msvcp140
)
{
if
(
!
init
())
return
;
...
...
@@ -1667,5 +1697,6 @@ START_TEST(msvcp140)
test_Equivalent
();
test_cnd
();
test_Copy_file
();
test__Mtx
();
FreeLibrary
(
msvcp
);
}
dlls/msvcp90/misc.c
View file @
8536af68
...
...
@@ -716,6 +716,9 @@ typedef struct
{
DWORD
flags
;
cs
cs
;
#if _MSVCP_VER >= 140
ULONG_PTR
unknown
;
#endif
DWORD
thread_id
;
DWORD
count
;
}
*
_Mtx_t
;
...
...
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