Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
27b3a5cc
Commit
27b3a5cc
authored
Sep 09, 2014
by
Daniel Lehman
Committed by
Alexandre Julliard
Sep 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use the configured CriticalSection timeout in RtlpWaitForCriticalSection.
parent
7ae1f45d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
critsection.c
dlls/ntdll/critsection.c
+8
-0
No files found.
dlls/ntdll/critsection.c
View file @
27b3a5cc
...
...
@@ -435,10 +435,12 @@ NTSTATUS WINAPI RtlDeleteCriticalSection( RTL_CRITICAL_SECTION *crit )
*/
NTSTATUS
WINAPI
RtlpWaitForCriticalSection
(
RTL_CRITICAL_SECTION
*
crit
)
{
LONGLONG
timeout
=
NtCurrentTeb
()
->
Peb
->
CriticalSectionTimeout
.
QuadPart
/
-
10000000
;
for
(;;)
{
EXCEPTION_RECORD
rec
;
NTSTATUS
status
=
wait_semaphore
(
crit
,
5
);
timeout
-=
5
;
if
(
status
==
STATUS_TIMEOUT
)
{
...
...
@@ -448,11 +450,14 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit )
ERR
(
"section %p %s wait timed out in thread %04x, blocked by %04x, retrying (60 sec)
\n
"
,
crit
,
debugstr_a
(
name
),
GetCurrentThreadId
(),
HandleToULong
(
crit
->
OwningThread
)
);
status
=
wait_semaphore
(
crit
,
60
);
timeout
-=
60
;
if
(
status
==
STATUS_TIMEOUT
&&
TRACE_ON
(
relay
)
)
{
ERR
(
"section %p %s wait timed out in thread %04x, blocked by %04x, retrying (5 min)
\n
"
,
crit
,
debugstr_a
(
name
),
GetCurrentThreadId
(),
HandleToULong
(
crit
->
OwningThread
)
);
status
=
wait_semaphore
(
crit
,
300
);
timeout
-=
300
;
}
}
if
(
status
==
STATUS_WAIT_0
)
break
;
...
...
@@ -460,6 +465,9 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit )
/* Throw exception only for Wine internal locks */
if
((
!
crit
->
DebugInfo
)
||
(
!
crit
->
DebugInfo
->
Spare
[
0
]))
continue
;
/* only throw deadlock exception if configured timeout is reached */
if
(
timeout
>
0
)
continue
;
rec
.
ExceptionCode
=
STATUS_POSSIBLE_DEADLOCK
;
rec
.
ExceptionFlags
=
0
;
rec
.
ExceptionRecord
=
NULL
;
...
...
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