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
7f0883ae
Commit
7f0883ae
authored
May 30, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
May 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Associate create and close IRPs with current thread.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e80b507f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+4
-0
device.c
server/device.c
+2
-2
No files found.
dlls/ntoskrnl.exe/tests/driver.c
View file @
7f0883ae
...
...
@@ -54,6 +54,7 @@ static int winetest_report_success;
static
POBJECT_TYPE
*
pExEventObjectType
,
*
pIoFileObjectType
,
*
pPsThreadType
;
static
PEPROCESS
*
pPsInitialSystemProcess
;
static
void
*
create_caller_thread
;
void
WINAPI
ObfReferenceObject
(
void
*
obj
);
...
...
@@ -356,6 +357,8 @@ static void test_current_thread(BOOL is_system)
ok
(
PsGetThreadId
((
PETHREAD
)
KeGetCurrentThread
())
==
PsGetCurrentThreadId
(),
"thread IDs don't match
\n
"
);
ok
(
PsIsSystemThread
((
PETHREAD
)
KeGetCurrentThread
())
==
is_system
,
"unexpected system thread
\n
"
);
if
(
!
is_system
)
ok
(
create_caller_thread
==
KeGetCurrentThread
(),
"thread is not create caller thread
\n
"
);
ret
=
ObOpenObjectByPointer
(
current
,
OBJ_KERNEL_HANDLE
,
NULL
,
PROCESS_QUERY_INFORMATION
,
NULL
,
KernelMode
,
&
process_handle
);
ok
(
!
ret
,
"ObOpenObjectByPointer failed: %#x
\n
"
,
ret
);
...
...
@@ -1644,6 +1647,7 @@ static NTSTATUS WINAPI driver_Create(DEVICE_OBJECT *device, IRP *irp)
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
last_created_file
=
irpsp
->
FileObject
;
create_caller_thread
=
KeGetCurrentThread
();
irp
->
IoStatus
.
Status
=
STATUS_SUCCESS
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
...
...
server/device.c
View file @
7f0883ae
...
...
@@ -475,7 +475,7 @@ static struct object *device_open_file( struct object *obj, unsigned int access,
if
((
irp
=
create_irp
(
file
,
&
params
,
NULL
)))
{
add_irp_to_queue
(
device
->
manager
,
irp
,
NULL
);
add_irp_to_queue
(
device
->
manager
,
irp
,
current
);
release_object
(
irp
);
}
}
...
...
@@ -523,7 +523,7 @@ static int device_file_close_handle( struct object *obj, struct process *process
if
((
irp
=
create_irp
(
file
,
&
params
,
NULL
)))
{
add_irp_to_queue
(
file
->
device
->
manager
,
irp
,
NULL
);
add_irp_to_queue
(
file
->
device
->
manager
,
irp
,
current
);
release_object
(
irp
);
}
}
...
...
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