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
dc7f1704
Commit
dc7f1704
authored
Dec 15, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add an apc_param_t type to store APC client-side parameters.
parent
93488b19
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
26 deletions
+31
-26
server_protocol.h
include/wine/server_protocol.h
+9
-8
async.c
server/async.c
+3
-3
completion.c
server/completion.c
+4
-3
fd.c
server/fd.c
+2
-2
file.h
server/file.h
+3
-2
protocol.def
server/protocol.def
+9
-8
make_requests
tools/make_requests
+1
-0
No files found.
include/wine/server_protocol.h
View file @
dc7f1704
...
@@ -23,6 +23,7 @@ typedef unsigned int thread_id_t;
...
@@ -23,6 +23,7 @@ typedef unsigned int thread_id_t;
typedef
unsigned
int
data_size_t
;
typedef
unsigned
int
data_size_t
;
typedef
unsigned
int
ioctl_code_t
;
typedef
unsigned
int
ioctl_code_t
;
typedef
unsigned
long
lparam_t
;
typedef
unsigned
long
lparam_t
;
typedef
unsigned
long
apc_param_t
;
typedef
unsigned
__int64
file_pos_t
;
typedef
unsigned
__int64
file_pos_t
;
struct
request_header
struct
request_header
...
@@ -164,7 +165,7 @@ typedef struct
...
@@ -164,7 +165,7 @@ typedef struct
void
*
arg
;
void
*
arg
;
void
*
apc
;
void
*
apc
;
obj_handle_t
event
;
obj_handle_t
event
;
unsigned
long
cvalue
;
apc_param_t
cvalue
;
}
async_data_t
;
}
async_data_t
;
...
@@ -260,7 +261,7 @@ typedef union
...
@@ -260,7 +261,7 @@ typedef union
{
{
enum
apc_type
type
;
enum
apc_type
type
;
void
(
__stdcall
*
func
)(
unsigned
long
,
unsigned
long
,
unsigned
long
);
void
(
__stdcall
*
func
)(
unsigned
long
,
unsigned
long
,
unsigned
long
);
unsigned
long
args
[
3
];
apc_param_t
args
[
3
];
}
user
;
}
user
;
struct
struct
{
{
...
@@ -4224,8 +4225,8 @@ struct add_completion_request
...
@@ -4224,8 +4225,8 @@ struct add_completion_request
{
{
struct
request_header
__header
;
struct
request_header
__header
;
obj_handle_t
handle
;
obj_handle_t
handle
;
unsigned
long
ckey
;
apc_param_t
ckey
;
unsigned
long
cvalue
;
apc_param_t
cvalue
;
unsigned
long
information
;
unsigned
long
information
;
unsigned
int
status
;
unsigned
int
status
;
};
};
...
@@ -4244,8 +4245,8 @@ struct remove_completion_request
...
@@ -4244,8 +4245,8 @@ struct remove_completion_request
struct
remove_completion_reply
struct
remove_completion_reply
{
{
struct
reply_header
__header
;
struct
reply_header
__header
;
unsigned
long
ckey
;
apc_param_t
ckey
;
unsigned
long
cvalue
;
apc_param_t
cvalue
;
unsigned
long
information
;
unsigned
long
information
;
unsigned
int
status
;
unsigned
int
status
;
};
};
...
@@ -4270,7 +4271,7 @@ struct set_completion_info_request
...
@@ -4270,7 +4271,7 @@ struct set_completion_info_request
struct
request_header
__header
;
struct
request_header
__header
;
obj_handle_t
handle
;
obj_handle_t
handle
;
obj_handle_t
chandle
;
obj_handle_t
chandle
;
unsigned
long
ckey
;
apc_param_t
ckey
;
};
};
struct
set_completion_info_reply
struct
set_completion_info_reply
{
{
...
@@ -4283,7 +4284,7 @@ struct add_fd_completion_request
...
@@ -4283,7 +4284,7 @@ struct add_fd_completion_request
{
{
struct
request_header
__header
;
struct
request_header
__header
;
obj_handle_t
handle
;
obj_handle_t
handle
;
unsigned
long
cvalue
;
apc_param_t
cvalue
;
unsigned
int
status
;
unsigned
int
status
;
unsigned
long
information
;
unsigned
long
information
;
};
};
...
...
server/async.c
View file @
dc7f1704
...
@@ -43,7 +43,7 @@ struct async
...
@@ -43,7 +43,7 @@ struct async
unsigned
int
timeout_status
;
/* status to report upon timeout */
unsigned
int
timeout_status
;
/* status to report upon timeout */
struct
event
*
event
;
struct
event
*
event
;
struct
completion
*
completion
;
struct
completion
*
completion
;
unsigned
long
comp_key
;
apc_param_t
comp_key
;
async_data_t
data
;
/* data for async I/O call */
async_data_t
data
;
/* data for async I/O call */
};
};
...
@@ -266,8 +266,8 @@ void async_set_result( struct object *obj, unsigned int status, unsigned long to
...
@@ -266,8 +266,8 @@ void async_set_result( struct object *obj, unsigned int status, unsigned long to
memset
(
&
data
,
0
,
sizeof
(
data
)
);
memset
(
&
data
,
0
,
sizeof
(
data
)
);
data
.
type
=
APC_USER
;
data
.
type
=
APC_USER
;
data
.
user
.
func
=
async
->
data
.
apc
;
data
.
user
.
func
=
async
->
data
.
apc
;
data
.
user
.
args
[
0
]
=
(
unsigned
long
)
async
->
data
.
arg
;
data
.
user
.
args
[
0
]
=
(
apc_param_t
)
async
->
data
.
arg
;
data
.
user
.
args
[
1
]
=
(
unsigned
long
)
async
->
data
.
iosb
;
data
.
user
.
args
[
1
]
=
(
apc_param_t
)
async
->
data
.
iosb
;
data
.
user
.
args
[
2
]
=
0
;
data
.
user
.
args
[
2
]
=
0
;
thread_queue_apc
(
async
->
thread
,
NULL
,
&
data
);
thread_queue_apc
(
async
->
thread
,
NULL
,
&
data
);
}
}
...
...
server/completion.c
View file @
dc7f1704
...
@@ -79,8 +79,8 @@ static const struct object_ops completion_ops =
...
@@ -79,8 +79,8 @@ static const struct object_ops completion_ops =
struct
comp_msg
struct
comp_msg
{
{
struct
list
queue_entry
;
struct
list
queue_entry
;
unsigned
long
ckey
;
apc_param_t
ckey
;
unsigned
long
cvalue
;
apc_param_t
cvalue
;
unsigned
long
information
;
unsigned
long
information
;
unsigned
int
status
;
unsigned
int
status
;
};
};
...
@@ -141,7 +141,8 @@ struct completion *get_completion_obj( struct process *process, obj_handle_t han
...
@@ -141,7 +141,8 @@ struct completion *get_completion_obj( struct process *process, obj_handle_t han
return
(
struct
completion
*
)
get_handle_obj
(
process
,
handle
,
access
,
&
completion_ops
);
return
(
struct
completion
*
)
get_handle_obj
(
process
,
handle
,
access
,
&
completion_ops
);
}
}
void
add_completion
(
struct
completion
*
completion
,
unsigned
long
ckey
,
unsigned
long
cvalue
,
unsigned
int
status
,
unsigned
long
information
)
void
add_completion
(
struct
completion
*
completion
,
apc_param_t
ckey
,
apc_param_t
cvalue
,
unsigned
int
status
,
unsigned
long
information
)
{
{
struct
comp_msg
*
msg
=
mem_alloc
(
sizeof
(
*
msg
)
);
struct
comp_msg
*
msg
=
mem_alloc
(
sizeof
(
*
msg
)
);
...
...
server/fd.c
View file @
dc7f1704
...
@@ -199,7 +199,7 @@ struct fd
...
@@ -199,7 +199,7 @@ struct fd
struct
async_queue
*
write_q
;
/* async writers of this fd */
struct
async_queue
*
write_q
;
/* async writers of this fd */
struct
async_queue
*
wait_q
;
/* other async waiters of this fd */
struct
async_queue
*
wait_q
;
/* other async waiters of this fd */
struct
completion
*
completion
;
/* completion object attached to this fd */
struct
completion
*
completion
;
/* completion object attached to this fd */
unsigned
long
comp_key
;
/* completion key to set in completion events */
apc_param_t
comp_key
;
/* completion key to set in completion events */
};
};
static
void
fd_dump
(
struct
object
*
obj
,
int
verbose
);
static
void
fd_dump
(
struct
object
*
obj
,
int
verbose
);
...
@@ -1940,7 +1940,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
...
@@ -1940,7 +1940,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
return
fd
;
return
fd
;
}
}
void
fd_assign_completion
(
struct
fd
*
fd
,
struct
completion
**
p_port
,
unsigned
long
*
p_key
)
void
fd_assign_completion
(
struct
fd
*
fd
,
struct
completion
**
p_port
,
apc_param_t
*
p_key
)
{
{
*
p_key
=
fd
->
comp_key
;
*
p_key
=
fd
->
comp_key
;
*
p_port
=
fd
->
completion
?
(
struct
completion
*
)
grab_object
(
fd
->
completion
)
:
NULL
;
*
p_port
=
fd
->
completion
?
(
struct
completion
*
)
grab_object
(
fd
->
completion
)
:
NULL
;
...
...
server/file.h
View file @
dc7f1704
...
@@ -124,7 +124,8 @@ extern struct object *create_dir_obj( struct fd *fd );
...
@@ -124,7 +124,8 @@ extern struct object *create_dir_obj( struct fd *fd );
/* completion */
/* completion */
extern
struct
completion
*
get_completion_obj
(
struct
process
*
process
,
obj_handle_t
handle
,
unsigned
int
access
);
extern
struct
completion
*
get_completion_obj
(
struct
process
*
process
,
obj_handle_t
handle
,
unsigned
int
access
);
extern
void
add_completion
(
struct
completion
*
completion
,
unsigned
long
ckey
,
unsigned
long
cvalue
,
unsigned
int
status
,
unsigned
long
information
);
extern
void
add_completion
(
struct
completion
*
completion
,
apc_param_t
ckey
,
apc_param_t
cvalue
,
unsigned
int
status
,
unsigned
long
information
);
/* serial port functions */
/* serial port functions */
...
@@ -141,7 +142,7 @@ extern void async_set_result( struct object *obj, unsigned int status, unsigned
...
@@ -141,7 +142,7 @@ extern void async_set_result( struct object *obj, unsigned int status, unsigned
extern
int
async_waiting
(
struct
async_queue
*
queue
);
extern
int
async_waiting
(
struct
async_queue
*
queue
);
extern
void
async_terminate
(
struct
async
*
async
,
unsigned
int
status
);
extern
void
async_terminate
(
struct
async
*
async
,
unsigned
int
status
);
extern
void
async_wake_up
(
struct
async_queue
*
queue
,
unsigned
int
status
);
extern
void
async_wake_up
(
struct
async_queue
*
queue
,
unsigned
int
status
);
extern
void
fd_assign_completion
(
struct
fd
*
fd
,
struct
completion
**
p_port
,
unsigned
long
*
p_key
);
extern
void
fd_assign_completion
(
struct
fd
*
fd
,
struct
completion
**
p_port
,
apc_param_t
*
p_key
);
/* access rights that require Unix read permission */
/* access rights that require Unix read permission */
#define FILE_UNIX_READ_ACCESS (FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA)
#define FILE_UNIX_READ_ACCESS (FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA)
...
...
server/protocol.def
View file @
dc7f1704
...
@@ -39,6 +39,7 @@ typedef unsigned int thread_id_t;
...
@@ -39,6 +39,7 @@ typedef unsigned int thread_id_t;
typedef unsigned int data_size_t;
typedef unsigned int data_size_t;
typedef unsigned int ioctl_code_t;
typedef unsigned int ioctl_code_t;
typedef unsigned long lparam_t;
typedef unsigned long lparam_t;
typedef unsigned long apc_param_t;
typedef unsigned __int64 file_pos_t;
typedef unsigned __int64 file_pos_t;
struct request_header
struct request_header
...
@@ -180,7 +181,7 @@ typedef struct
...
@@ -180,7 +181,7 @@ typedef struct
void *arg; /* opaque user data to pass to callback */
void *arg; /* opaque user data to pass to callback */
void *apc; /* user apc to call */
void *apc; /* user apc to call */
obj_handle_t event; /* event to signal when done */
obj_handle_t event; /* event to signal when done */
unsigned long
cvalue; /* completion value to use for completion events */
apc_param_t
cvalue; /* completion value to use for completion events */
} async_data_t;
} async_data_t;
/* structures for extra message data */
/* structures for extra message data */
...
@@ -276,7 +277,7 @@ typedef union
...
@@ -276,7 +277,7 @@ typedef union
{
{
enum apc_type type; /* APC_USER */
enum apc_type type; /* APC_USER */
void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
unsigned long
args[3]; /* arguments for user function */
apc_param_t
args[3]; /* arguments for user function */
} user;
} user;
struct
struct
{
{
...
@@ -3031,8 +3032,8 @@ enum message_type
...
@@ -3031,8 +3032,8 @@ enum message_type
/* add completion to completion port */
/* add completion to completion port */
@REQ(add_completion)
@REQ(add_completion)
obj_handle_t handle; /* port handle */
obj_handle_t handle; /* port handle */
unsigned long
ckey; /* completion key */
apc_param_t
ckey; /* completion key */
unsigned long
cvalue; /* completion value */
apc_param_t
cvalue; /* completion value */
unsigned long information; /* IO_STATUS_BLOCK Information */
unsigned long information; /* IO_STATUS_BLOCK Information */
unsigned int status; /* completion result */
unsigned int status; /* completion result */
@END
@END
...
@@ -3042,8 +3043,8 @@ enum message_type
...
@@ -3042,8 +3043,8 @@ enum message_type
@REQ(remove_completion)
@REQ(remove_completion)
obj_handle_t handle; /* port handle */
obj_handle_t handle; /* port handle */
@REPLY
@REPLY
unsigned long
ckey; /* completion key */
apc_param_t
ckey; /* completion key */
unsigned long
cvalue; /* completion value */
apc_param_t
cvalue; /* completion value */
unsigned long information; /* IO_STATUS_BLOCK Information */
unsigned long information; /* IO_STATUS_BLOCK Information */
unsigned int status; /* completion result */
unsigned int status; /* completion result */
@END
@END
...
@@ -3061,14 +3062,14 @@ enum message_type
...
@@ -3061,14 +3062,14 @@ enum message_type
@REQ(set_completion_info)
@REQ(set_completion_info)
obj_handle_t handle; /* object handle */
obj_handle_t handle; /* object handle */
obj_handle_t chandle; /* port handle */
obj_handle_t chandle; /* port handle */
unsigned long
ckey; /* completion key */
apc_param_t
ckey; /* completion key */
@END
@END
/* check for associated completion and push msg */
/* check for associated completion and push msg */
@REQ(add_fd_completion)
@REQ(add_fd_completion)
obj_handle_t handle; /* async' object */
obj_handle_t handle; /* async' object */
unsigned long
cvalue; /* completion value */
apc_param_t
cvalue; /* completion value */
unsigned int status; /* completion status */
unsigned int status; /* completion status */
unsigned long information; /* IO_STATUS_BLOCK Information */
unsigned long information; /* IO_STATUS_BLOCK Information */
@END
@END
...
...
tools/make_requests
View file @
dc7f1704
...
@@ -38,6 +38,7 @@ my %formats =
...
@@ -38,6 +38,7 @@ my %formats =
"process_id_t"
=>
[
4
,
4
,
"%04x"
],
"process_id_t"
=>
[
4
,
4
,
"%04x"
],
"thread_id_t"
=>
[
4
,
4
,
"%04x"
],
"thread_id_t"
=>
[
4
,
4
,
"%04x"
],
"lparam_t"
=>
[
4
,
4
,
"%lx"
],
"lparam_t"
=>
[
4
,
4
,
"%lx"
],
"apc_param_t"
=>
[
4
,
4
,
"%lx"
],
"timeout_t"
=>
[
8
,
8
,
"&dump_timeout"
],
"timeout_t"
=>
[
8
,
8
,
"&dump_timeout"
],
"rectangle_t"
=>
[
16
,
4
,
"&dump_rectangle"
],
"rectangle_t"
=>
[
16
,
4
,
"&dump_rectangle"
],
"char_info_t"
=>
[
4
,
2
,
"&dump_char_info"
],
"char_info_t"
=>
[
4
,
2
,
"&dump_char_info"
],
...
...
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