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
83e3a9c9
Commit
83e3a9c9
authored
May 06, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Allow cancelling async I/O for all object types.
parent
62802339
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
fd.c
server/fd.c
+4
-4
file.h
server/file.h
+2
-2
sock.c
server/sock.c
+5
-4
No files found.
server/fd.c
View file @
83e3a9c9
...
...
@@ -2100,15 +2100,14 @@ void default_fd_reselect_async( struct fd *fd, struct async_queue *queue )
}
/* default cancel_async() fd routine */
void
default_fd_cancel_async
(
struct
fd
*
fd
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
)
int
default_fd_cancel_async
(
struct
fd
*
fd
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
)
{
int
n
=
0
;
n
+=
async_wake_up_by
(
fd
->
read_q
,
process
,
thread
,
iosb
,
STATUS_CANCELLED
);
n
+=
async_wake_up_by
(
fd
->
write_q
,
process
,
thread
,
iosb
,
STATUS_CANCELLED
);
n
+=
async_wake_up_by
(
fd
->
wait_q
,
process
,
thread
,
iosb
,
STATUS_CANCELLED
);
if
(
!
n
&&
iosb
)
set_error
(
STATUS_NOT_FOUND
);
return
n
;
}
static
inline
int
is_valid_mounted_device
(
struct
stat
*
st
)
...
...
@@ -2377,7 +2376,8 @@ DECL_HANDLER(cancel_async)
if
(
fd
)
{
if
(
get_unix_fd
(
fd
)
!=
-
1
)
fd
->
fd_ops
->
cancel_async
(
fd
,
current
->
process
,
thread
,
req
->
iosb
);
int
count
=
fd
->
fd_ops
->
cancel_async
(
fd
,
current
->
process
,
thread
,
req
->
iosb
);
if
(
!
count
&&
req
->
iosb
)
set_error
(
STATUS_NOT_FOUND
);
release_object
(
fd
);
}
}
...
...
server/file.h
View file @
83e3a9c9
...
...
@@ -52,7 +52,7 @@ struct fd_ops
/* selected events for async i/o need an update */
void
(
*
reselect_async
)(
struct
fd
*
,
struct
async_queue
*
queue
);
/* cancel an async operation */
void
(
*
cancel_async
)(
struct
fd
*
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
);
int
(
*
cancel_async
)(
struct
fd
*
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
);
};
/* file descriptor functions */
...
...
@@ -98,7 +98,7 @@ extern obj_handle_t default_fd_ioctl( struct fd *fd, ioctl_code_t code, const as
extern
void
no_fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
,
int
count
);
extern
void
default_fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
,
int
count
);
extern
void
default_fd_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
extern
void
default_fd_cancel_async
(
struct
fd
*
fd
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
);
extern
int
default_fd_cancel_async
(
struct
fd
*
fd
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
);
extern
void
main_loop
(
void
);
extern
void
remove_process_locks
(
struct
process
*
process
);
...
...
server/sock.c
View file @
83e3a9c9
...
...
@@ -133,7 +133,7 @@ static enum server_fd_type sock_get_fd_type( struct fd *fd );
static
obj_handle_t
sock_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
const
async_data_t
*
async
,
int
blocking
);
static
void
sock_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
,
int
count
);
static
void
sock_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
static
void
sock_cancel_async
(
struct
fd
*
fd
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
);
static
int
sock_cancel_async
(
struct
fd
*
fd
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
);
static
int
sock_get_ntstatus
(
int
err
);
static
int
sock_get_error
(
int
err
);
...
...
@@ -609,16 +609,17 @@ static void sock_reselect_async( struct fd *fd, struct async_queue *queue )
sock_reselect
(
sock
);
}
static
void
sock_cancel_async
(
struct
fd
*
fd
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
)
static
int
sock_cancel_async
(
struct
fd
*
fd
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
)
{
struct
sock
*
sock
=
get_fd_user
(
fd
);
int
n
=
0
;
assert
(
sock
->
obj
.
ops
==
&
sock_ops
);
n
+=
async_wake_up_by
(
sock
->
read_q
,
process
,
thread
,
iosb
,
STATUS_CANCELLED
);
n
+=
async_wake_up_by
(
sock
->
write_q
,
process
,
thread
,
iosb
,
STATUS_CANCELLED
);
if
(
!
n
&&
iosb
)
set_error
(
STATUS_NOT_FOUND
)
;
n
+=
async_wake_up_by
(
sock
->
ifchange_q
,
process
,
thread
,
iosb
,
STATUS_CANCELLED
);
return
n
;
}
static
struct
fd
*
sock_get_fd
(
struct
object
*
obj
)
...
...
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