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
de339f30
Commit
de339f30
authored
Jan 07, 2002
by
Mike McCormack
Committed by
Alexandre Julliard
Jan 07, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement CancelIo properly.
parent
0964495b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
file.c
files/file.c
+17
-1
file.h
include/file.h
+1
-0
synchro.c
scheduler/synchro.c
+1
-1
No files found.
files/file.c
View file @
de339f30
...
...
@@ -1275,7 +1275,23 @@ BOOL FILE_StartAsync(HANDLE hFile, LPOVERLAPPED lpOverlapped, DWORD type, DWORD
*/
BOOL
WINAPI
CancelIo
(
HANDLE
handle
)
{
return
FILE_StartAsync
(
handle
,
NULL
,
ASYNC_TYPE_NONE
,
0
,
STATUS_CANCELLED
);
async_private
*
ovp
,
*
t
;
TRACE
(
"handle = %x
\n
"
,
handle
);
ovp
=
NtCurrentTeb
()
->
pending_list
;
while
(
ovp
)
{
t
=
ovp
->
next
;
if
(
FILE_StartAsync
(
handle
,
ovp
->
lpOverlapped
,
ovp
->
type
,
0
,
STATUS_CANCELLED
))
{
TRACE
(
"overlapped = %p
\n
"
,
ovp
->
lpOverlapped
);
finish_async
(
ovp
,
STATUS_CANCELLED
);
}
ovp
=
t
;
}
WaitForMultipleObjectsEx
(
0
,
NULL
,
FALSE
,
1
,
TRUE
);
return
TRUE
;
}
/***********************************************************************
...
...
include/file.h
View file @
de339f30
...
...
@@ -49,6 +49,7 @@ typedef struct async_private
}
async_private
;
extern
void
WINAPI
check_async_list
(
LPOVERLAPPED
ov
,
DWORD
status
);
extern
void
finish_async
(
struct
async_private
*
ovp
,
DWORD
status
);
/* locale-independent case conversion */
inline
static
char
FILE_tolower
(
char
c
)
...
...
scheduler/synchro.c
View file @
de339f30
...
...
@@ -47,7 +47,7 @@ static void CALLBACK call_completion_routine(ULONG_PTR data)
HeapFree
(
GetProcessHeap
(),
0
,
ovp
);
}
static
void
finish_async
(
async_private
*
ovp
,
DWORD
status
)
void
finish_async
(
async_private
*
ovp
,
DWORD
status
)
{
ovp
->
lpOverlapped
->
Internal
=
status
;
...
...
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