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
64dc8f5c
Commit
64dc8f5c
authored
Dec 04, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Store iosb in async object.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d2b3c6c3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
15 deletions
+22
-15
async.c
server/async.c
+8
-1
change.c
server/change.c
+1
-1
device.c
server/device.c
+1
-1
fd.c
server/fd.c
+3
-3
file.h
server/file.h
+2
-2
mailslot.c
server/mailslot.c
+1
-1
named_pipe.c
server/named_pipe.c
+3
-3
serial.c
server/serial.c
+1
-1
sock.c
server/sock.c
+2
-2
No files found.
server/async.c
View file @
64dc8f5c
...
...
@@ -47,6 +47,7 @@ struct async
int
signaled
;
struct
event
*
event
;
async_data_t
data
;
/* data for async I/O call */
struct
iosb
*
iosb
;
/* I/O status block */
};
static
void
async_dump
(
struct
object
*
obj
,
int
verbose
);
...
...
@@ -141,6 +142,7 @@ static void async_destroy( struct object *obj )
if
(
async
->
timeout
)
remove_timeout_user
(
async
->
timeout
);
if
(
async
->
event
)
release_object
(
async
->
event
);
if
(
async
->
iosb
)
release_object
(
async
->
iosb
);
release_object
(
async
->
queue
);
release_object
(
async
->
thread
);
}
...
...
@@ -172,6 +174,7 @@ void async_terminate( struct async *async, unsigned int status )
}
async
->
status
=
status
;
if
(
async
->
iosb
&&
async
->
iosb
->
status
==
STATUS_PENDING
)
async
->
iosb
->
status
=
status
;
if
(
async
->
data
.
callback
)
{
...
...
@@ -225,7 +228,8 @@ void free_async_queue( struct async_queue *queue )
}
/* create an async on a given queue of a fd */
struct
async
*
create_async
(
struct
thread
*
thread
,
struct
async_queue
*
queue
,
const
async_data_t
*
data
)
struct
async
*
create_async
(
struct
thread
*
thread
,
struct
async_queue
*
queue
,
const
async_data_t
*
data
,
struct
iosb
*
iosb
)
{
struct
event
*
event
=
NULL
;
struct
async
*
async
;
...
...
@@ -247,6 +251,9 @@ struct async *create_async( struct thread *thread, struct async_queue *queue, co
async
->
queue
=
(
struct
async_queue
*
)
grab_object
(
queue
);
async
->
signaled
=
0
;
if
(
iosb
)
async
->
iosb
=
(
struct
iosb
*
)
grab_object
(
iosb
);
else
async
->
iosb
=
NULL
;
list_add_tail
(
&
queue
->
queue
,
&
async
->
queue_entry
);
list_add_tail
(
&
thread
->
process
->
asyncs
,
&
async
->
process_entry
);
grab_object
(
async
);
...
...
server/change.c
View file @
64dc8f5c
...
...
@@ -1246,7 +1246,7 @@ DECL_HANDLER(read_directory_changes)
return
;
/* requests don't timeout */
if
(
!
(
async
=
fd_queue_async
(
dir
->
fd
,
&
req
->
async
,
ASYNC_TYPE_WAIT
)))
goto
end
;
if
(
!
(
async
=
fd_queue_async
(
dir
->
fd
,
&
req
->
async
,
NULL
,
ASYNC_TYPE_WAIT
)))
goto
end
;
/* assign it once */
if
(
!
dir
->
filter
)
...
...
server/device.c
View file @
64dc8f5c
...
...
@@ -488,7 +488,7 @@ static obj_handle_t queue_irp( struct device_file *file, struct irp_call *irp,
if
(
blocking
&&
!
(
handle
=
alloc_handle
(
current
->
process
,
irp
,
SYNCHRONIZE
,
0
)))
return
0
;
if
(
!
(
irp
->
async
=
fd_queue_async
(
file
->
fd
,
async_data
,
ASYNC_TYPE_WAIT
)))
if
(
!
(
irp
->
async
=
fd_queue_async
(
file
->
fd
,
async_data
,
irp
->
iosb
,
ASYNC_TYPE_WAIT
)))
{
if
(
handle
)
close_handle
(
current
->
process
,
handle
);
return
0
;
...
...
server/fd.c
View file @
64dc8f5c
...
...
@@ -2030,7 +2030,7 @@ void default_poll_event( struct fd *fd, int event )
else
if
(
!
fd
->
inode
)
set_fd_events
(
fd
,
fd
->
fd_ops
->
get_poll_events
(
fd
)
);
}
struct
async
*
fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
)
struct
async
*
fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
struct
iosb
*
iosb
,
int
type
)
{
struct
async_queue
*
queue
;
struct
async
*
async
;
...
...
@@ -2054,7 +2054,7 @@ struct async *fd_queue_async( struct fd *fd, const async_data_t *data, int type
assert
(
0
);
}
if
((
async
=
create_async
(
current
,
queue
,
data
))
&&
type
!=
ASYNC_TYPE_WAIT
)
if
((
async
=
create_async
(
current
,
queue
,
data
,
iosb
))
&&
type
!=
ASYNC_TYPE_WAIT
)
{
if
(
!
fd
->
inode
)
set_fd_events
(
fd
,
fd
->
fd_ops
->
get_poll_events
(
fd
)
);
...
...
@@ -2096,7 +2096,7 @@ void default_fd_queue_async( struct fd *fd, const async_data_t *data, int type,
{
struct
async
*
async
;
if
((
async
=
fd_queue_async
(
fd
,
data
,
type
)))
if
((
async
=
fd_queue_async
(
fd
,
data
,
NULL
,
type
)))
{
release_object
(
async
);
set_error
(
STATUS_PENDING
);
...
...
server/file.h
View file @
64dc8f5c
...
...
@@ -97,7 +97,7 @@ extern int default_fd_signaled( struct object *obj, struct wait_queue_entry *ent
extern
unsigned
int
default_fd_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
extern
int
default_fd_get_poll_events
(
struct
fd
*
fd
);
extern
void
default_poll_event
(
struct
fd
*
fd
,
int
event
);
extern
struct
async
*
fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
);
extern
struct
async
*
fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
struct
iosb
*
iosb
,
int
type
);
extern
void
fd_async_wake_up
(
struct
fd
*
fd
,
int
type
,
unsigned
int
status
);
extern
void
fd_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
extern
obj_handle_t
no_fd_read
(
struct
fd
*
fd
,
const
async_data_t
*
async
,
int
blocking
,
file_pos_t
pos
);
...
...
@@ -177,7 +177,7 @@ extern struct object *create_serial( struct fd *fd );
extern
struct
async_queue
*
create_async_queue
(
struct
fd
*
fd
);
extern
void
free_async_queue
(
struct
async_queue
*
queue
);
extern
struct
async
*
create_async
(
struct
thread
*
thread
,
struct
async_queue
*
queue
,
const
async_data_t
*
data
);
const
async_data_t
*
data
,
struct
iosb
*
iosb
);
extern
void
async_set_timeout
(
struct
async
*
async
,
timeout_t
timeout
,
unsigned
int
status
);
extern
void
async_set_result
(
struct
object
*
obj
,
unsigned
int
status
,
apc_param_t
total
,
client_ptr_t
apc
,
client_ptr_t
apc_arg
);
...
...
server/mailslot.c
View file @
64dc8f5c
...
...
@@ -332,7 +332,7 @@ static void mailslot_queue_async( struct fd *fd, const async_data_t *data, int t
assert
(
mailslot
->
obj
.
ops
==
&
mailslot_ops
);
if
((
async
=
fd_queue_async
(
fd
,
data
,
type
)))
if
((
async
=
fd_queue_async
(
fd
,
data
,
NULL
,
type
)))
{
async_set_timeout
(
async
,
mailslot
->
read_timeout
?
mailslot
->
read_timeout
:
-
1
,
STATUS_IO_TIMEOUT
);
...
...
server/named_pipe.c
View file @
64dc8f5c
...
...
@@ -555,7 +555,7 @@ static obj_handle_t pipe_server_flush( struct fd *fd, const async_data_t *async_
if
(
!
pipe_data_remaining
(
server
))
return
0
;
if
((
async
=
fd_queue_async
(
server
->
fd
,
async_data
,
ASYNC_TYPE_WAIT
)))
if
((
async
=
fd_queue_async
(
server
->
fd
,
async_data
,
NULL
,
ASYNC_TYPE_WAIT
)))
{
/* there's no unix way to be alerted when a pipe becomes empty, so resort to polling */
if
(
!
server
->
flush_poll
)
...
...
@@ -602,7 +602,7 @@ static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, const a
{
case
ps_idle_server
:
case
ps_wait_connect
:
if
((
async
=
fd_queue_async
(
server
->
ioctl_fd
,
async_data
,
ASYNC_TYPE_WAIT
)))
if
((
async
=
fd_queue_async
(
server
->
ioctl_fd
,
async_data
,
NULL
,
ASYNC_TYPE_WAIT
)))
{
if
(
blocking
)
wait_handle
=
alloc_handle
(
current
->
process
,
async
,
SYNCHRONIZE
,
0
);
set_server_state
(
server
,
ps_wait_open
);
...
...
@@ -855,7 +855,7 @@ static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code,
if
(
!
pipe
->
waiters
&&
!
(
pipe
->
waiters
=
create_async_queue
(
NULL
)))
goto
done
;
if
((
async
=
create_async
(
current
,
pipe
->
waiters
,
async_data
)))
if
((
async
=
create_async
(
current
,
pipe
->
waiters
,
async_data
,
NULL
)))
{
timeout_t
when
=
buffer
->
TimeoutSpecified
?
buffer
->
Timeout
.
QuadPart
:
pipe
->
timeout
;
async_set_timeout
(
async
,
when
,
STATUS_IO_TIMEOUT
);
...
...
server/serial.c
View file @
64dc8f5c
...
...
@@ -201,7 +201,7 @@ static void serial_queue_async( struct fd *fd, const async_data_t *data, int typ
break
;
}
if
((
async
=
fd_queue_async
(
fd
,
data
,
type
)))
if
((
async
=
fd_queue_async
(
fd
,
data
,
NULL
,
type
)))
{
if
(
timeout
)
async_set_timeout
(
async
,
timeout
*
-
10000
,
STATUS_TIMEOUT
);
release_object
(
async
);
...
...
server/sock.c
View file @
64dc8f5c
...
...
@@ -552,7 +552,7 @@ obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *a
return
0
;
}
if
(
!
(
ifchange_q
=
sock_get_ifchange_q
(
sock
)))
return
0
;
if
(
!
(
async
=
create_async
(
current
,
ifchange_q
,
async_data
)))
return
0
;
if
(
!
(
async
=
create_async
(
current
,
ifchange_q
,
async_data
,
NULL
)))
return
0
;
if
(
blocking
)
wait_handle
=
alloc_handle
(
current
->
process
,
async
,
SYNCHRONIZE
,
0
);
release_object
(
async
);
set_error
(
STATUS_PENDING
);
...
...
@@ -593,7 +593,7 @@ static void sock_queue_async( struct fd *fd, const async_data_t *data, int type,
return
;
}
if
(
!
(
async
=
create_async
(
current
,
queue
,
data
)))
return
;
if
(
!
(
async
=
create_async
(
current
,
queue
,
data
,
NULL
)))
return
;
release_object
(
async
);
sock_reselect
(
sock
);
...
...
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