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
38b7c883
Commit
38b7c883
authored
May 07, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Don't run user APCs in NtCancelIoFile.
parent
e40e5661
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
29 deletions
+4
-29
file.c
dlls/ntdll/file.c
+0
-22
file.c
dlls/ntdll/tests/file.c
+4
-6
pipe.c
dlls/ntdll/tests/pipe.c
+0
-1
No files found.
dlls/ntdll/file.c
View file @
38b7c883
...
...
@@ -3457,8 +3457,6 @@ NTSTATUS WINAPI NtDeleteFile( POBJECT_ATTRIBUTES ObjectAttributes )
*/
NTSTATUS
WINAPI
NtCancelIoFileEx
(
HANDLE
hFile
,
PIO_STATUS_BLOCK
iosb
,
PIO_STATUS_BLOCK
io_status
)
{
LARGE_INTEGER
timeout
;
TRACE
(
"%p %p %p
\n
"
,
hFile
,
iosb
,
io_status
);
SERVER_START_REQ
(
cancel_async
)
...
...
@@ -3469,16 +3467,7 @@ NTSTATUS WINAPI NtCancelIoFileEx( HANDLE hFile, PIO_STATUS_BLOCK iosb, PIO_STATU
io_status
->
u
.
Status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
io_status
->
u
.
Status
)
return
io_status
->
u
.
Status
;
/* Let some APC be run, so that we can run the remaining APCs on hFile
* either the cancelation of the pending one, but also the execution
* of the queued APC, but not yet run. This is needed to ensure proper
* clean-up of allocated data.
*/
timeout
.
QuadPart
=
0
;
NtDelayExecution
(
TRUE
,
&
timeout
);
return
io_status
->
u
.
Status
;
}
...
...
@@ -3489,8 +3478,6 @@ NTSTATUS WINAPI NtCancelIoFileEx( HANDLE hFile, PIO_STATUS_BLOCK iosb, PIO_STATU
*/
NTSTATUS
WINAPI
NtCancelIoFile
(
HANDLE
hFile
,
PIO_STATUS_BLOCK
io_status
)
{
LARGE_INTEGER
timeout
;
TRACE
(
"%p %p
\n
"
,
hFile
,
io_status
);
SERVER_START_REQ
(
cancel_async
)
...
...
@@ -3501,16 +3488,7 @@ NTSTATUS WINAPI NtCancelIoFile( HANDLE hFile, PIO_STATUS_BLOCK io_status )
io_status
->
u
.
Status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
io_status
->
u
.
Status
)
return
io_status
->
u
.
Status
;
/* Let some APC be run, so that we can run the remaining APCs on hFile
* either the cancelation of the pending one, but also the execution
* of the queued APC, but not yet run. This is needed to ensure proper
* clean-up of allocated data.
*/
timeout
.
QuadPart
=
0
;
NtDelayExecution
(
TRUE
,
&
timeout
);
return
io_status
->
u
.
Status
;
}
...
...
dlls/ntdll/tests/file.c
View file @
38b7c883
...
...
@@ -668,7 +668,7 @@ static void read_file_test(void)
ok
(
U
(
iosb
).
Status
==
STATUS_CANCELLED
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
iosb
.
Information
==
0
,
"wrong info %lu
\n
"
,
iosb
.
Information
);
ok
(
is_signaled
(
event
),
"event is signaled
\n
"
);
todo_wine
ok
(
!
apc_count
,
"apc was called
\n
"
);
ok
(
!
apc_count
,
"apc was called
\n
"
);
SleepEx
(
1
,
TRUE
);
/* alertable sleep */
ok
(
apc_count
==
1
,
"apc was not called
\n
"
);
...
...
@@ -694,7 +694,7 @@ static void read_file_test(void)
ok
(
U
(
iosb
).
Status
==
STATUS_CANCELLED
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
iosb
.
Information
==
0
,
"wrong info %lu
\n
"
,
iosb
.
Information
);
ok
(
is_signaled
(
event
),
"event is signaled
\n
"
);
todo_wine
ok
(
!
apc_count
,
"apc was called
\n
"
);
ok
(
!
apc_count
,
"apc was called
\n
"
);
SleepEx
(
1
,
TRUE
);
/* alertable sleep */
ok
(
apc_count
==
1
,
"apc was not called
\n
"
);
CloseHandle
(
handle
);
...
...
@@ -720,7 +720,7 @@ static void read_file_test(void)
ok
(
U
(
iosb
).
Status
==
STATUS_CANCELLED
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
iosb
.
Information
==
0
,
"wrong info %lu
\n
"
,
iosb
.
Information
);
ok
(
is_signaled
(
event
),
"event is signaled
\n
"
);
todo_wine
ok
(
!
apc_count
,
"apc was called
\n
"
);
ok
(
!
apc_count
,
"apc was called
\n
"
);
SleepEx
(
1
,
TRUE
);
/* alertable sleep */
ok
(
apc_count
==
1
,
"apc was not called
\n
"
);
...
...
@@ -746,7 +746,7 @@ static void read_file_test(void)
ok
(
U
(
iosb
).
Status
==
STATUS_CANCELLED
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
iosb
.
Information
==
0
,
"wrong info %lu
\n
"
,
iosb
.
Information
);
ok
(
is_signaled
(
event
),
"event is signaled
\n
"
);
todo_wine
ok
(
!
apc_count
,
"apc was called
\n
"
);
ok
(
!
apc_count
,
"apc was called
\n
"
);
SleepEx
(
1
,
TRUE
);
/* alertable sleep */
ok
(
apc_count
==
2
,
"apc was not called
\n
"
);
...
...
@@ -2521,7 +2521,6 @@ static void test_read_write(void)
ret
=
ReadFile
(
hfile
,
buf
,
0
,
&
bytes
,
&
ovl
);
/* ReadFile return value depends on Windows version and testing it is not practical */
if
(
!
ret
)
todo_wine
ok
(
GetLastError
()
==
ERROR_IO_PENDING
,
"expected ERROR_IO_PENDING, got %d
\n
"
,
GetLastError
());
ret
=
GetLastError
();
ok
(
bytes
==
0
,
"bytes %u
\n
"
,
bytes
);
...
...
@@ -2552,7 +2551,6 @@ todo_wine
ret
=
ReadFile
(
hfile
,
NULL
,
0
,
&
bytes
,
&
ovl
);
/* ReadFile return value depends on Windows version and testing it is not practical */
if
(
!
ret
)
todo_wine
ok
(
GetLastError
()
==
ERROR_IO_PENDING
,
"expected ERROR_IO_PENDING, got %d
\n
"
,
GetLastError
());
ret
=
GetLastError
();
ok
(
bytes
==
0
,
"bytes %u
\n
"
,
bytes
);
...
...
dlls/ntdll/tests/pipe.c
View file @
38b7c883
...
...
@@ -474,7 +474,6 @@ static void test_cancelio(void)
ok
(
U
(
iosb
).
Status
==
STATUS_CANCELLED
,
"Wrong iostatus %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
WaitForSingleObject
(
hEvent
,
0
)
==
0
,
"hEvent not signaled
\n
"
);
todo_wine
ok
(
!
ioapc_called
,
"IOAPC ran too early
\n
"
);
SleepEx
(
0
,
TRUE
);
/* alertable wait state */
...
...
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