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
7b33613f
Commit
7b33613f
authored
Jul 04, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make fd_queue_async infallible.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
99dfb290
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
28 deletions
+20
-28
change.c
server/change.c
+2
-2
device.c
server/device.c
+1
-1
fd.c
server/fd.c
+3
-3
file.h
server/file.h
+1
-1
mailslot.c
server/mailslot.c
+4
-6
named_pipe.c
server/named_pipe.c
+6
-10
serial.c
server/serial.c
+3
-5
No files found.
server/change.c
View file @
7b33613f
...
...
@@ -1247,7 +1247,7 @@ DECL_HANDLER(read_directory_changes)
/* requests don't timeout */
if
(
!
(
async
=
create_async
(
dir
->
fd
,
current
,
&
req
->
async
,
NULL
)))
goto
end
;
if
(
!
fd_queue_async
(
dir
->
fd
,
async
,
ASYNC_TYPE_WAIT
))
goto
end
;
fd_queue_async
(
dir
->
fd
,
async
,
ASYNC_TYPE_WAIT
)
;
/* assign it once */
if
(
!
dir
->
filter
)
...
...
@@ -1269,8 +1269,8 @@ DECL_HANDLER(read_directory_changes)
set_error
(
STATUS_PENDING
);
release_object
(
async
);
end
:
if
(
async
)
release_object
(
async
);
release_object
(
dir
);
}
...
...
server/device.c
View file @
7b33613f
...
...
@@ -464,7 +464,7 @@ static void set_file_user_ptr( struct device_file *file, client_ptr_t ptr )
/* queue an irp to the device */
static
int
queue_irp
(
struct
device_file
*
file
,
struct
irp_call
*
irp
,
struct
async
*
async
)
{
if
(
!
fd_queue_async
(
file
->
fd
,
async
,
ASYNC_TYPE_WAIT
))
return
0
;
fd_queue_async
(
file
->
fd
,
async
,
ASYNC_TYPE_WAIT
)
;
irp
->
async
=
(
struct
async
*
)
grab_object
(
async
);
add_irp_to_queue
(
file
,
irp
,
current
);
...
...
server/fd.c
View file @
7b33613f
...
...
@@ -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
)
);
}
int
fd_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
int
type
)
void
fd_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
int
type
)
{
struct
async_queue
*
queue
;
...
...
@@ -2059,7 +2059,6 @@ int fd_queue_async( struct fd *fd, struct async *async, int type )
else
/* regular files are always ready for read and write */
async_wake_up
(
queue
,
STATUS_ALERTED
);
}
return
1
;
}
void
fd_async_wake_up
(
struct
fd
*
fd
,
int
type
,
unsigned
int
status
)
...
...
@@ -2092,7 +2091,8 @@ void no_fd_queue_async( struct fd *fd, struct async *async, int type, int count
void
default_fd_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
int
type
,
int
count
)
{
if
(
fd_queue_async
(
fd
,
async
,
type
))
set_error
(
STATUS_PENDING
);
fd_queue_async
(
fd
,
async
,
type
);
set_error
(
STATUS_PENDING
);
}
/* default reselect_async() fd routine */
...
...
server/file.h
View file @
7b33613f
...
...
@@ -102,7 +102,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
int
fd_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
int
type
);
extern
void
fd_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
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
int
no_fd_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
...
...
server/mailslot.c
View file @
7b33613f
...
...
@@ -331,12 +331,10 @@ static void mailslot_queue_async( struct fd *fd, struct async *async, int type,
assert
(
mailslot
->
obj
.
ops
==
&
mailslot_ops
);
if
(
fd_queue_async
(
fd
,
async
,
type
))
{
async_set_timeout
(
async
,
mailslot
->
read_timeout
?
mailslot
->
read_timeout
:
-
1
,
STATUS_IO_TIMEOUT
);
set_error
(
STATUS_PENDING
);
}
fd_queue_async
(
fd
,
async
,
type
);
async_set_timeout
(
async
,
mailslot
->
read_timeout
?
mailslot
->
read_timeout
:
-
1
,
STATUS_IO_TIMEOUT
);
set_error
(
STATUS_PENDING
);
}
static
void
mailslot_device_dump
(
struct
object
*
obj
,
int
verbose
)
...
...
server/named_pipe.c
View file @
7b33613f
...
...
@@ -653,8 +653,7 @@ static int pipe_end_flush( struct pipe_end *pipe_end, struct async *async )
if
(
use_server_io
(
pipe_end
)
&&
(
!
pipe_end
->
connection
||
list_empty
(
&
pipe_end
->
connection
->
message_queue
)))
return
1
;
if
(
!
fd_queue_async
(
pipe_end
->
fd
,
async
,
ASYNC_TYPE_WAIT
))
return
0
;
fd_queue_async
(
pipe_end
->
fd
,
async
,
ASYNC_TYPE_WAIT
);
set_error
(
STATUS_PENDING
);
return
1
;
}
...
...
@@ -933,14 +932,11 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
{
case
ps_idle_server
:
case
ps_wait_connect
:
if
(
fd_queue_async
(
server
->
ioctl_fd
,
async
,
ASYNC_TYPE_WAIT
))
{
set_server_state
(
server
,
ps_wait_open
);
async_wake_up
(
&
server
->
pipe
->
waiters
,
STATUS_SUCCESS
);
set_error
(
STATUS_PENDING
);
return
1
;
}
break
;
fd_queue_async
(
server
->
ioctl_fd
,
async
,
ASYNC_TYPE_WAIT
);
set_server_state
(
server
,
ps_wait_open
);
async_wake_up
(
&
server
->
pipe
->
waiters
,
STATUS_SUCCESS
);
set_error
(
STATUS_PENDING
);
return
1
;
case
ps_connected_server
:
set_error
(
STATUS_PIPE_CONNECTED
);
break
;
...
...
server/serial.c
View file @
7b33613f
...
...
@@ -244,11 +244,9 @@ static void serial_queue_async( struct fd *fd, struct async *async, int type, in
break
;
}
if
(
fd_queue_async
(
fd
,
async
,
type
))
{
if
(
timeout
)
async_set_timeout
(
async
,
timeout
*
-
10000
,
STATUS_TIMEOUT
);
set_error
(
STATUS_PENDING
);
}
fd_queue_async
(
fd
,
async
,
type
);
if
(
timeout
)
async_set_timeout
(
async
,
timeout
*
-
10000
,
STATUS_TIMEOUT
);
set_error
(
STATUS_PENDING
);
}
static
void
serial_read_timeout
(
void
*
arg
)
...
...
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