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
acb43cfe
Commit
acb43cfe
authored
Jul 16, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Wait in overlapped Read/WriteFile even when no overlapped structure is passed.
parent
d362b58d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
file.c
dlls/kernel32/file.c
+12
-0
pipe.c
dlls/kernel32/tests/pipe.c
+2
-8
No files found.
dlls/kernel32/file.c
View file @
acb43cfe
...
...
@@ -424,6 +424,12 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
status
=
NtReadFile
(
hFile
,
hEvent
,
NULL
,
NULL
,
io_status
,
buffer
,
bytesToRead
,
poffset
,
NULL
);
if
(
status
==
STATUS_PENDING
&&
!
overlapped
)
{
WaitForSingleObject
(
hFile
,
INFINITE
);
status
=
io_status
->
u
.
Status
;
}
if
(
status
!=
STATUS_PENDING
&&
bytesRead
)
*
bytesRead
=
io_status
->
Information
;
...
...
@@ -510,6 +516,12 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
buffer
,
bytesToWrite
);
}
if
(
status
==
STATUS_PENDING
&&
!
overlapped
)
{
WaitForSingleObject
(
hFile
,
INFINITE
);
status
=
piosb
->
u
.
Status
;
}
if
(
status
!=
STATUS_PENDING
&&
bytesWritten
)
*
bytesWritten
=
piosb
->
Information
;
...
...
dlls/kernel32/tests/pipe.c
View file @
acb43cfe
...
...
@@ -1293,10 +1293,7 @@ static DWORD CALLBACK overlapped_server(LPVOID arg)
/* This should block */
ret
=
ReadFile
(
pipe
,
buf
,
sizeof
(
buf
),
&
num
,
NULL
);
if
(
ret
==
0
)
todo_wine
ok
(
ret
==
1
,
"ret %d
\n
"
,
ret
);
else
ok
(
ret
==
1
,
"ret %d
\n
"
,
ret
);
ok
(
ret
==
1
,
"ret %d
\n
"
,
ret
);
DisconnectNamedPipe
(
pipe
);
CloseHandle
(
ol
.
hEvent
);
...
...
@@ -1322,10 +1319,7 @@ static void test_overlapped(void)
Sleep
(
1
);
ret
=
WriteFile
(
pipe
,
"x"
,
1
,
&
num
,
NULL
);
if
(
ret
==
0
)
todo_wine
ok
(
ret
==
1
,
"ret %d
\n
"
,
ret
);
else
ok
(
ret
==
1
,
"ret %d
\n
"
,
ret
);
ok
(
ret
==
1
,
"ret %d
\n
"
,
ret
);
WaitForSingleObject
(
thread
,
INFINITE
);
CloseHandle
(
pipe
);
...
...
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