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
ee5ee5c5
Commit
ee5ee5c5
authored
May 19, 2010
by
Mike Kaplinskiy
Committed by
Alexandre Julliard
May 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Move async activation into separate function.
parent
b8fb1c97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
sock.c
server/sock.c
+19
-14
No files found.
server/sock.c
View file @
ee5ee5c5
...
...
@@ -295,6 +295,23 @@ static inline int sock_error( struct fd *fd )
return
optval
;
}
static
void
sock_dispatch_asyncs
(
struct
sock
*
sock
,
int
event
)
{
if
(
sock
->
flags
&
WSA_FLAG_OVERLAPPED
)
{
if
(
event
&
(
POLLIN
|
POLLPRI
|
POLLERR
|
POLLHUP
)
&&
async_waiting
(
sock
->
read_q
))
{
if
(
debug_level
)
fprintf
(
stderr
,
"activating read queue for socket %p
\n
"
,
sock
);
async_wake_up
(
sock
->
read_q
,
STATUS_ALERTED
);
}
if
(
event
&
(
POLLOUT
|
POLLERR
|
POLLHUP
)
&&
async_waiting
(
sock
->
write_q
))
{
if
(
debug_level
)
fprintf
(
stderr
,
"activating write queue for socket %p
\n
"
,
sock
);
async_wake_up
(
sock
->
write_q
,
STATUS_ALERTED
);
}
}
}
static
void
sock_poll_event
(
struct
fd
*
fd
,
int
event
)
{
struct
sock
*
sock
=
get_fd_user
(
fd
);
...
...
@@ -422,23 +439,11 @@ static void sock_poll_event( struct fd *fd, int event )
event
|=
POLLHUP
;
}
sock_dispatch_asyncs
(
sock
,
event
);
/* wake up anyone waiting for whatever just happened */
sock_wake_up
(
sock
);
if
(
sock
->
flags
&
WSA_FLAG_OVERLAPPED
)
{
if
(
event
&
(
POLLIN
|
POLLPRI
|
POLLERR
|
POLLHUP
)
&&
async_waiting
(
sock
->
read_q
))
{
if
(
debug_level
)
fprintf
(
stderr
,
"activating read queue for socket %p
\n
"
,
sock
);
async_wake_up
(
sock
->
read_q
,
STATUS_ALERTED
);
}
if
(
event
&
(
POLLOUT
|
POLLERR
|
POLLHUP
)
&&
async_waiting
(
sock
->
write_q
))
{
if
(
debug_level
)
fprintf
(
stderr
,
"activating write queue for socket %p
\n
"
,
sock
);
async_wake_up
(
sock
->
write_q
,
STATUS_ALERTED
);
}
}
/* if anyone is stupid enough to wait on the socket object itself,
* maybe we should wake them up too, just in case? */
wake_up
(
&
sock
->
obj
,
0
);
...
...
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