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
5c8d1127
Commit
5c8d1127
authored
Apr 12, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Introduce async_is_blocking helper and use it in sock_ioctl.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5af62255
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
async.c
server/async.c
+5
-0
file.h
server/file.h
+1
-0
sock.c
server/sock.c
+2
-2
No files found.
server/async.c
View file @
5c8d1127
...
@@ -472,6 +472,11 @@ struct iosb *async_get_iosb( struct async *async )
...
@@ -472,6 +472,11 @@ struct iosb *async_get_iosb( struct async *async )
return
async
->
iosb
?
(
struct
iosb
*
)
grab_object
(
async
->
iosb
)
:
NULL
;
return
async
->
iosb
?
(
struct
iosb
*
)
grab_object
(
async
->
iosb
)
:
NULL
;
}
}
int
async_is_blocking
(
struct
async
*
async
)
{
return
!
async
->
event
&&
!
async
->
data
.
apc
&&
!
async
->
data
.
apc_context
;
}
/* find the first pending async in queue */
/* find the first pending async in queue */
struct
async
*
find_pending_async
(
struct
async_queue
*
queue
)
struct
async
*
find_pending_async
(
struct
async_queue
*
queue
)
{
{
...
...
server/file.h
View file @
5c8d1127
...
@@ -187,6 +187,7 @@ extern struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key )
...
@@ -187,6 +187,7 @@ extern struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key )
extern
void
fd_copy_completion
(
struct
fd
*
src
,
struct
fd
*
dst
);
extern
void
fd_copy_completion
(
struct
fd
*
src
,
struct
fd
*
dst
);
extern
struct
iosb
*
create_iosb
(
const
void
*
in_data
,
data_size_t
in_size
,
data_size_t
out_size
);
extern
struct
iosb
*
create_iosb
(
const
void
*
in_data
,
data_size_t
in_size
,
data_size_t
out_size
);
extern
struct
iosb
*
async_get_iosb
(
struct
async
*
async
);
extern
struct
iosb
*
async_get_iosb
(
struct
async
*
async
);
extern
int
async_is_blocking
(
struct
async
*
async
);
extern
struct
async
*
find_pending_async
(
struct
async_queue
*
queue
);
extern
struct
async
*
find_pending_async
(
struct
async_queue
*
queue
);
extern
void
cancel_process_asyncs
(
struct
process
*
process
);
extern
void
cancel_process_asyncs
(
struct
process
*
process
);
...
...
server/sock.c
View file @
5c8d1127
...
@@ -545,14 +545,14 @@ obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async,
...
@@ -545,14 +545,14 @@ obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async,
switch
(
code
)
switch
(
code
)
{
{
case
WS_SIO_ADDRESS_LIST_CHANGE
:
case
WS_SIO_ADDRESS_LIST_CHANGE
:
if
((
sock
->
state
&
FD_WINE_NONBLOCKING
)
&&
blocking
)
if
((
sock
->
state
&
FD_WINE_NONBLOCKING
)
&&
async_is_blocking
(
async
)
)
{
{
set_error
(
STATUS_CANT_WAIT
);
set_error
(
STATUS_CANT_WAIT
);
return
0
;
return
0
;
}
}
if
(
!
(
ifchange_q
=
sock_get_ifchange_q
(
sock
)))
return
0
;
if
(
!
(
ifchange_q
=
sock_get_ifchange_q
(
sock
)))
return
0
;
queue_async
(
ifchange_q
,
async
);
queue_async
(
ifchange_q
,
async
);
if
(
blocking
)
wait_handle
=
alloc_handle
(
current
->
process
,
async
,
SYNCHRONIZE
,
0
);
if
(
async_is_blocking
(
async
)
)
wait_handle
=
alloc_handle
(
current
->
process
,
async
,
SYNCHRONIZE
,
0
);
set_error
(
STATUS_PENDING
);
set_error
(
STATUS_PENDING
);
return
wait_handle
;
return
wait_handle
;
default:
default:
...
...
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