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
101da2b5
Commit
101da2b5
authored
May 28, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
May 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Store IRP client pointer on server side.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dfe20465
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
5 deletions
+19
-5
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+7
-3
server_protocol.h
include/wine/server_protocol.h
+2
-1
device.c
server/device.c
+6
-0
protocol.def
server/protocol.def
+1
-0
request.h
server/request.h
+2
-1
trace.c
server/trace.c
+1
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
101da2b5
...
...
@@ -557,6 +557,7 @@ struct dispatch_context
{
irp_params_t
params
;
HANDLE
handle
;
IRP
*
irp
;
ULONG
in_size
;
void
*
in_buff
;
};
...
...
@@ -570,6 +571,7 @@ static void dispatch_irp( DEVICE_OBJECT *device, IRP *irp, struct dispatch_conte
KeQueryTickCount
(
&
count
);
/* update the global KeTickCount */
context
->
irp
=
irp
;
device
->
CurrentIrp
=
irp
;
IoCallDriver
(
device
,
irp
);
device
->
CurrentIrp
=
NULL
;
...
...
@@ -931,9 +933,10 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event )
SERVER_START_REQ
(
get_next_device_request
)
{
req
->
manager
=
wine_server_obj_handle
(
manager
);
req
->
prev
=
wine_server_obj_handle
(
context
.
handle
);
req
->
status
=
status
;
req
->
manager
=
wine_server_obj_handle
(
manager
);
req
->
prev
=
wine_server_obj_handle
(
context
.
handle
);
req
->
user_ptr
=
wine_server_client_ptr
(
context
.
irp
);
req
->
status
=
status
;
wine_server_set_reply
(
req
,
context
.
in_buff
,
context
.
in_size
);
if
(
!
(
status
=
wine_server_call
(
req
)))
{
...
...
@@ -949,6 +952,7 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event )
if
(
status
==
STATUS_BUFFER_OVERFLOW
)
context
.
in_size
=
reply
->
in_size
;
}
context
.
irp
=
NULL
;
}
SERVER_END_REQ
;
...
...
include/wine/server_protocol.h
View file @
101da2b5
...
...
@@ -5252,6 +5252,7 @@ struct get_next_device_request_request
obj_handle_t
manager
;
obj_handle_t
prev
;
unsigned
int
status
;
client_ptr_t
user_ptr
;
};
struct
get_next_device_request_reply
{
...
...
@@ -6694,6 +6695,6 @@ union generic_reply
struct
resume_process_reply
resume_process_reply
;
};
#define SERVER_PROTOCOL_VERSION 58
3
#define SERVER_PROTOCOL_VERSION 58
4
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/device.c
View file @
101da2b5
...
...
@@ -52,6 +52,7 @@ struct irp_call
struct
async
*
async
;
/* pending async op */
irp_params_t
params
;
/* irp parameters */
struct
iosb
*
iosb
;
/* I/O status block */
client_ptr_t
user_ptr
;
/* client side pointer */
};
static
void
irp_call_dump
(
struct
object
*
obj
,
int
verbose
);
...
...
@@ -351,6 +352,7 @@ static struct irp_call *create_irp( struct device_file *file, const irp_params_t
irp
->
async
=
NULL
;
irp
->
params
=
*
params
;
irp
->
iosb
=
NULL
;
irp
->
user_ptr
=
0
;
if
(
async
)
irp
->
iosb
=
async_get_iosb
(
async
);
if
(
!
irp
->
iosb
&&
!
(
irp
->
iosb
=
create_iosb
(
NULL
,
0
,
0
)))
...
...
@@ -886,13 +888,17 @@ DECL_HANDLER(get_next_device_request)
if
(
req
->
prev
)
close_handle
(
current
->
process
,
req
->
prev
);
/* avoid an extra round-trip for close */
/* process result of previous call */
if
(
manager
->
current_call
)
{
irp
=
manager
->
current_call
;
irp
->
user_ptr
=
req
->
user_ptr
;
if
(
req
->
status
)
set_irp_result
(
irp
,
req
->
status
,
NULL
,
0
,
0
);
else
if
(
irp
->
async
)
set_async_pending
(
irp
->
async
,
irp
->
file
&&
is_fd_overlapped
(
irp
->
file
->
fd
)
);
free_irp_params
(
irp
);
release_object
(
irp
);
manager
->
current_call
=
NULL
;
...
...
server/protocol.def
View file @
101da2b5
...
...
@@ -3633,6 +3633,7 @@ struct handle_info
obj_handle_t manager; /* handle to the device manager */
obj_handle_t prev; /* handle to the previous irp */
unsigned int status; /* status of the previous irp */
client_ptr_t user_ptr; /* user pointer of the previous irp */
@REPLY
irp_params_t params; /* irp parameters */
obj_handle_t next; /* handle to the next irp */
...
...
server/request.h
View file @
101da2b5
...
...
@@ -2287,7 +2287,8 @@ C_ASSERT( sizeof(struct delete_device_request) == 24 );
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_device_request_request
,
manager
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_device_request_request
,
prev
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_device_request_request
,
status
)
==
20
);
C_ASSERT
(
sizeof
(
struct
get_next_device_request_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_device_request_request
,
user_ptr
)
==
24
);
C_ASSERT
(
sizeof
(
struct
get_next_device_request_request
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_device_request_reply
,
params
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_device_request_reply
,
next
)
==
40
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_next_device_request_reply
,
client_tid
)
==
44
);
...
...
server/trace.c
View file @
101da2b5
...
...
@@ -4282,6 +4282,7 @@ static void dump_get_next_device_request_request( const struct get_next_device_r
fprintf
(
stderr
,
" manager=%04x"
,
req
->
manager
);
fprintf
(
stderr
,
", prev=%04x"
,
req
->
prev
);
fprintf
(
stderr
,
", status=%08x"
,
req
->
status
);
dump_uint64
(
", user_ptr="
,
&
req
->
user_ptr
);
}
static
void
dump_get_next_device_request_reply
(
const
struct
get_next_device_request_reply
*
req
)
...
...
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