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
2964c2b3
Commit
2964c2b3
authored
Oct 10, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Oct 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vcomp: Use RtlIsCriticalSectionLockedByThread to check lock owner.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
240cf962
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
main.c
dlls/vcomp/main.c
+3
-8
No files found.
dlls/vcomp/main.c
View file @
2964c2b3
...
...
@@ -29,6 +29,7 @@
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/debug.h"
#include "wine/list.h"
...
...
@@ -1051,12 +1052,6 @@ static void destroy_critsect(CRITICAL_SECTION *critsect)
HeapFree
(
GetProcessHeap
(),
0
,
critsect
);
}
static
BOOL
critsect_is_locked
(
CRITICAL_SECTION
*
critsect
)
{
return
critsect
->
OwningThread
==
ULongToHandle
(
GetCurrentThreadId
())
&&
critsect
->
RecursionCount
;
}
void
CDECL
omp_init_lock
(
omp_lock_t
*
lock
)
{
TRACE
(
"(%p)
\n
"
,
lock
);
...
...
@@ -1073,7 +1068,7 @@ void CDECL omp_set_lock(omp_lock_t *lock)
{
TRACE
(
"(%p)
\n
"
,
lock
);
if
(
critsect_is_locke
d
(
*
lock
))
if
(
RtlIsCriticalSectionLockedByThrea
d
(
*
lock
))
{
ERR
(
"omp_set_lock called while holding lock %p
\n
"
,
*
lock
);
ExitProcess
(
1
);
...
...
@@ -1092,7 +1087,7 @@ int CDECL omp_test_lock(omp_lock_t *lock)
{
TRACE
(
"(%p)
\n
"
,
lock
);
if
(
critsect_is_locke
d
(
*
lock
))
if
(
RtlIsCriticalSectionLockedByThrea
d
(
*
lock
))
return
0
;
return
TryEnterCriticalSection
(
*
lock
);
...
...
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