Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fa4679fe
Commit
fa4679fe
authored
Mar 21, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add support for storing an event to signal upon async I/O completion.
parent
31ade1eb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
server_protocol.h
include/wine/server_protocol.h
+2
-1
async.c
server/async.c
+14
-2
protocol.def
server/protocol.def
+1
-0
trace.c
server/trace.c
+2
-1
No files found.
include/wine/server_protocol.h
View file @
fa4679fe
...
...
@@ -162,6 +162,7 @@ typedef struct
void
*
callback
;
void
*
iosb
;
void
*
arg
;
obj_handle_t
event
;
}
async_data_t
;
...
...
@@ -4699,6 +4700,6 @@ union generic_reply
struct
allocate_locally_unique_id_reply
allocate_locally_unique_id_reply
;
};
#define SERVER_PROTOCOL_VERSION 28
3
#define SERVER_PROTOCOL_VERSION 28
4
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/async.c
View file @
fa4679fe
...
...
@@ -38,6 +38,7 @@ struct async
struct
thread
*
thread
;
/* owning thread */
struct
list
queue_entry
;
/* entry in file descriptor queue */
struct
timeout_user
*
timeout
;
struct
event
*
event
;
async_data_t
data
;
/* data for async I/O call */
};
...
...
@@ -73,6 +74,7 @@ static void async_destroy( struct object *obj )
assert
(
obj
->
ops
==
&
async_ops
);
if
(
async
->
timeout
)
remove_timeout_user
(
async
->
timeout
);
if
(
async
->
event
)
release_object
(
async
->
event
);
release_object
(
async
->
thread
);
}
...
...
@@ -109,11 +111,20 @@ static void async_timeout( void *private )
struct
async
*
create_async
(
struct
thread
*
thread
,
const
struct
timeval
*
timeout
,
struct
list
*
queue
,
const
async_data_t
*
data
)
{
struct
async
*
async
=
alloc_object
(
&
async_ops
);
struct
event
*
event
=
NULL
;
struct
async
*
async
;
if
(
!
async
)
return
NULL
;
if
(
data
->
event
&&
!
(
event
=
get_event_obj
(
thread
->
process
,
data
->
event
,
EVENT_MODIFY_STATE
)))
return
NULL
;
if
(
!
(
async
=
alloc_object
(
&
async_ops
)))
{
if
(
event
)
release_object
(
event
);
return
NULL
;
}
async
->
thread
=
(
struct
thread
*
)
grab_object
(
thread
);
async
->
event
=
event
;
async
->
data
=
*
data
;
list_add_tail
(
queue
,
&
async
->
queue_entry
);
...
...
@@ -121,6 +132,7 @@ struct async *create_async( struct thread *thread, const struct timeval *timeout
if
(
timeout
)
async
->
timeout
=
add_timeout_user
(
timeout
,
async_timeout
,
async
);
else
async
->
timeout
=
NULL
;
if
(
event
)
reset_event
(
event
);
return
async
;
}
...
...
server/protocol.def
View file @
fa4679fe
...
...
@@ -178,6 +178,7 @@ typedef struct
void *callback; /* client-side callback to call upon end of async */
void *iosb; /* I/O status block in client addr space */
void *arg; /* opaque user data to pass to callback */
obj_handle_t event; /* event to signal when done */
} async_data_t;
/* structures for extra message data */
...
...
server/trace.c
View file @
fa4679fe
...
...
@@ -245,7 +245,8 @@ static void dump_apc_result( const apc_result_t *result )
static
void
dump_async_data
(
const
async_data_t
*
data
)
{
fprintf
(
stderr
,
"{callback=%p,iosb=%p,arg=%p}"
,
data
->
callback
,
data
->
iosb
,
data
->
arg
);
fprintf
(
stderr
,
"{callback=%p,iosb=%p,arg=%p,event=%p}"
,
data
->
callback
,
data
->
iosb
,
data
->
arg
,
data
->
event
);
}
static
void
dump_luid
(
const
luid_t
*
luid
)
...
...
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