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
8843bc14
Commit
8843bc14
authored
Mar 03, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Allow passing an argument for the user APC async I/O callbacks.
parent
4273b0d9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
6 deletions
+11
-6
server.c
dlls/ntdll/server.c
+1
-0
server_protocol.h
include/wine/server_protocol.h
+2
-1
async.c
server/async.c
+3
-2
file.h
server/file.h
+1
-1
protocol.def
server/protocol.def
+1
-0
thread.c
server/thread.c
+2
-2
trace.c
server/trace.c
+1
-0
No files found.
dlls/ntdll/server.c
View file @
8843bc14
...
...
@@ -401,6 +401,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
{
result
->
async_io
.
total
=
iosb
->
Information
;
result
->
async_io
.
apc
=
wine_server_client_ptr
(
apc
);
result
->
async_io
.
arg
=
call
->
async_io
.
user
;
}
break
;
}
...
...
include/wine/server_protocol.h
View file @
8843bc14
...
...
@@ -554,6 +554,7 @@ typedef union
enum
apc_type
type
;
unsigned
int
status
;
client_ptr_t
apc
;
client_ptr_t
arg
;
unsigned
int
total
;
}
async_io
;
struct
...
...
@@ -5847,6 +5848,6 @@ union generic_reply
struct
set_suspend_context_reply
set_suspend_context_reply
;
};
#define SERVER_PROTOCOL_VERSION 45
8
#define SERVER_PROTOCOL_VERSION 45
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/async.c
View file @
8843bc14
...
...
@@ -262,7 +262,8 @@ static void add_async_completion( struct async_queue *queue, apc_param_t cvalue,
}
/* store the result of the client-side async callback */
void
async_set_result
(
struct
object
*
obj
,
unsigned
int
status
,
apc_param_t
total
,
client_ptr_t
apc
)
void
async_set_result
(
struct
object
*
obj
,
unsigned
int
status
,
apc_param_t
total
,
client_ptr_t
apc
,
client_ptr_t
apc_arg
)
{
struct
async
*
async
=
(
struct
async
*
)
obj
;
...
...
@@ -293,7 +294,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
memset
(
&
data
,
0
,
sizeof
(
data
)
);
data
.
type
=
APC_USER
;
data
.
user
.
func
=
apc
;
data
.
user
.
args
[
0
]
=
a
sync
->
data
.
arg
;
data
.
user
.
args
[
0
]
=
a
pc_
arg
;
data
.
user
.
args
[
1
]
=
async
->
data
.
iosb
;
data
.
user
.
args
[
2
]
=
0
;
thread_queue_apc
(
async
->
thread
,
NULL
,
&
data
);
...
...
server/file.h
View file @
8843bc14
...
...
@@ -159,7 +159,7 @@ extern struct async *create_async( struct thread *thread, struct async_queue *qu
const
async_data_t
*
data
);
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
);
apc_param_t
total
,
client_ptr_t
apc
,
client_ptr_t
apc_arg
);
extern
int
async_queued
(
struct
async_queue
*
queue
);
extern
int
async_waiting
(
struct
async_queue
*
queue
);
extern
void
async_terminate
(
struct
async
*
async
,
unsigned
int
status
);
...
...
server/protocol.def
View file @
8843bc14
...
...
@@ -570,6 +570,7 @@ typedef union
enum apc_type type; /* APC_ASYNC_IO */
unsigned int status; /* new status of async operation */
client_ptr_t apc; /* user APC to call */
client_ptr_t arg; /* user APC argument */
unsigned int total; /* bytes transferred */
} async_io;
struct
...
...
server/thread.c
View file @
8843bc14
...
...
@@ -1451,8 +1451,8 @@ DECL_HANDLER(select)
else
if
(
apc
->
result
.
type
==
APC_ASYNC_IO
)
{
if
(
apc
->
owner
)
async_set_result
(
apc
->
owner
,
apc
->
result
.
async_io
.
status
,
apc
->
result
.
async_io
.
total
,
apc
->
result
.
async_io
.
apc
);
async_set_result
(
apc
->
owner
,
apc
->
result
.
async_io
.
status
,
apc
->
result
.
async_io
.
total
,
apc
->
result
.
async_io
.
apc
,
apc
->
result
.
async_io
.
arg
);
}
wake_up
(
&
apc
->
obj
,
0
);
close_handle
(
current
->
process
,
req
->
prev_apc
);
...
...
server/trace.c
View file @
8843bc14
...
...
@@ -227,6 +227,7 @@ static void dump_apc_result( const char *prefix, const apc_result_t *result )
fprintf
(
stderr
,
"APC_ASYNC_IO,status=%s,total=%u"
,
get_status_name
(
result
->
async_io
.
status
),
result
->
async_io
.
total
);
dump_uint64
(
",apc="
,
&
result
->
async_io
.
apc
);
dump_uint64
(
",arg="
,
&
result
->
async_io
.
arg
);
break
;
case
APC_VIRTUAL_ALLOC
:
fprintf
(
stderr
,
"APC_VIRTUAL_ALLOC,status=%s"
,
...
...
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