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
43ba0a1b
Commit
43ba0a1b
authored
May 01, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
May 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implement IoQueueWorkItem.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
322f0b57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+29
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
wdm.h
include/ddk/wdm.h
+10
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
43ba0a1b
...
...
@@ -1235,6 +1235,8 @@ void WINAPI IoFreeMdl(PMDL mdl)
struct
_IO_WORKITEM
{
DEVICE_OBJECT
*
device
;
PIO_WORKITEM_ROUTINE
worker
;
void
*
context
;
};
/***********************************************************************
...
...
@@ -1262,6 +1264,33 @@ void WINAPI IoFreeWorkItem( PIO_WORKITEM work_item )
}
void
WINAPI
run_work_item_worker
(
TP_CALLBACK_INSTANCE
*
instance
,
void
*
context
)
{
PIO_WORKITEM
work_item
=
context
;
DEVICE_OBJECT
*
device
=
work_item
->
device
;
TRACE
(
"%p: calling %p(%p %p)
\n
"
,
work_item
,
work_item
->
worker
,
device
,
work_item
->
context
);
work_item
->
worker
(
device
,
work_item
->
context
);
TRACE
(
"done
\n
"
);
ObDereferenceObject
(
device
);
}
/***********************************************************************
* IoQueueWorkItem (NTOSKRNL.EXE.@)
*/
void
WINAPI
IoQueueWorkItem
(
PIO_WORKITEM
work_item
,
PIO_WORKITEM_ROUTINE
worker
,
WORK_QUEUE_TYPE
type
,
void
*
context
)
{
TRACE
(
"%p %p %u %p
\n
"
,
work_item
,
worker
,
type
,
context
);
ObReferenceObject
(
work_item
->
device
);
work_item
->
worker
=
worker
;
work_item
->
context
=
context
;
TrySubmitThreadpoolCallback
(
run_work_item_worker
,
work_item
,
NULL
);
}
/***********************************************************************
* IoAttachDeviceToDeviceStack (NTOSKRNL.EXE.@)
*/
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
43ba0a1b
...
...
@@ -428,7 +428,7 @@
@ stub IoQueryFileInformation
@ stub IoQueryVolumeInformation
@ stub IoQueueThreadIrp
@ st
ub IoQueueWorkItem
@ st
dcall IoQueueWorkItem(ptr ptr long ptr)
@ stub IoRaiseHardError
@ stub IoRaiseInformationalHardError
@ stub IoReadDiskSignature
...
...
include/ddk/wdm.h
View file @
43ba0a1b
...
...
@@ -1460,6 +1460,15 @@ typedef enum _DIRECTORY_NOTIFY_INFORMATION_CLASS {
DirectoryNotifyExtendedInformation
}
DIRECTORY_NOTIFY_INFORMATION_CLASS
,
*
PDIRECTORY_NOTIFY_INFORMATION_CLASS
;
typedef
enum
_WORK_QUEUE_TYPE
{
CriticalWorkQueue
,
DelayedWorkQueue
,
HyperCriticalWorkQueue
,
MaximumWorkQueue
}
WORK_QUEUE_TYPE
;
typedef
void
(
WINAPI
*
PIO_WORKITEM_ROUTINE
)(
PDEVICE_OBJECT
,
void
*
);
NTSTATUS
WINAPI
ObCloseHandle
(
IN
HANDLE
handle
);
#ifdef NONAMELESSUNION
...
...
@@ -1568,6 +1577,7 @@ PDEVICE_OBJECT WINAPI IoGetRelatedDeviceObject(PFILE_OBJECT);
void
WINAPI
IoInitializeIrp
(
IRP
*
,
USHORT
,
CCHAR
);
VOID
WINAPI
IoInitializeRemoveLockEx
(
PIO_REMOVE_LOCK
,
ULONG
,
ULONG
,
ULONG
,
ULONG
);
void
WINAPI
IoInvalidateDeviceRelations
(
PDEVICE_OBJECT
,
DEVICE_RELATION_TYPE
);
void
WINAPI
IoQueueWorkItem
(
PIO_WORKITEM
,
PIO_WORKITEM_ROUTINE
,
WORK_QUEUE_TYPE
,
void
*
);
NTSTATUS
WINAPI
IoRegisterDeviceInterface
(
PDEVICE_OBJECT
,
const
GUID
*
,
PUNICODE_STRING
,
PUNICODE_STRING
);
void
WINAPI
IoReleaseCancelSpinLock
(
KIRQL
);
NTSTATUS
WINAPI
IoSetDeviceInterfaceState
(
UNICODE_STRING
*
,
BOOLEAN
);
...
...
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