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
6c45b626
Commit
6c45b626
authored
Jun 25, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 25, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- NtWaitForSingleObject doesn't return WAIT_FAILED.
- Use STATUS_WAIT_0 not WAIT_OBJECT_0.
parent
51c583f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
rtl.c
dlls/ntdll/rtl.c
+8
-4
No files found.
dlls/ntdll/rtl.c
View file @
6c45b626
...
...
@@ -167,10 +167,13 @@ start:
wait:
if
(
fWait
)
{
NTSTATUS
status
;
rwl
->
uExclusiveWaiters
++
;
RtlLeaveCriticalSection
(
&
rwl
->
rtlCS
);
if
(
NtWaitForSingleObject
(
rwl
->
hExclusiveReleaseSemaphore
,
FALSE
,
NULL
)
==
WAIT_FAILED
)
status
=
NtWaitForSingleObject
(
rwl
->
hExclusiveReleaseSemaphore
,
FALSE
,
NULL
);
if
(
HIWORD
(
status
)
)
goto
done
;
goto
start
;
/* restart the acquisition to avoid deadlocks */
}
...
...
@@ -191,7 +194,7 @@ done:
*/
BYTE
WINAPI
RtlAcquireResourceShared
(
LPRTL_RWLOCK
rwl
,
BYTE
fWait
)
{
DWORD
dwWait
=
WAIT_FAILED
;
NTSTATUS
status
=
STATUS_UNSUCCESSFUL
;
BYTE
retVal
=
0
;
if
(
!
rwl
)
return
0
;
...
...
@@ -210,14 +213,15 @@ start:
{
rwl
->
uSharedWaiters
++
;
RtlLeaveCriticalSection
(
&
rwl
->
rtlCS
);
if
(
(
dwWait
=
NtWaitForSingleObject
(
rwl
->
hSharedReleaseSemaphore
,
FALSE
,
NULL
))
==
WAIT_FAILED
)
status
=
NtWaitForSingleObject
(
rwl
->
hSharedReleaseSemaphore
,
FALSE
,
NULL
);
if
(
HIWORD
(
status
)
)
goto
done
;
goto
start
;
}
}
else
{
if
(
dwWait
!=
WAIT_OBJEC
T_0
)
/* otherwise RtlReleaseResource() has already done it */
if
(
status
!=
STATUS_WAI
T_0
)
/* otherwise RtlReleaseResource() has already done it */
rwl
->
iNumberActive
++
;
retVal
=
1
;
}
...
...
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