Commit 322f0b57 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntoskrnl.exe: Implement IoAllocateWorkItem and IoFreeWorkItem.

parent 73b99d29
...@@ -1232,13 +1232,33 @@ void WINAPI IoFreeMdl(PMDL mdl) ...@@ -1232,13 +1232,33 @@ void WINAPI IoFreeMdl(PMDL mdl)
} }
struct _IO_WORKITEM
{
DEVICE_OBJECT *device;
};
/*********************************************************************** /***********************************************************************
* IoAllocateWorkItem (NTOSKRNL.EXE.@) * IoAllocateWorkItem (NTOSKRNL.EXE.@)
*/ */
PIO_WORKITEM WINAPI IoAllocateWorkItem( PDEVICE_OBJECT DeviceObject ) PIO_WORKITEM WINAPI IoAllocateWorkItem( PDEVICE_OBJECT device )
{ {
FIXME( "stub: %p\n", DeviceObject ); PIO_WORKITEM work_item;
return NULL;
TRACE( "%p\n", device );
if (!(work_item = ExAllocatePool( PagedPool, sizeof(*work_item) ))) return NULL;
work_item->device = device;
return work_item;
}
/***********************************************************************
* IoFreeWorkItem (NTOSKRNL.EXE.@)
*/
void WINAPI IoFreeWorkItem( PIO_WORKITEM work_item )
{
TRACE( "%p\n", work_item );
ExFreePool( work_item );
} }
......
...@@ -383,7 +383,7 @@ ...@@ -383,7 +383,7 @@
@ stub IoFreeErrorLogEntry @ stub IoFreeErrorLogEntry
@ stdcall IoFreeIrp(ptr) @ stdcall IoFreeIrp(ptr)
@ stdcall IoFreeMdl(ptr) @ stdcall IoFreeMdl(ptr)
@ stub IoFreeWorkItem @ stdcall IoFreeWorkItem(ptr)
@ stdcall IoGetAttachedDevice(ptr) @ stdcall IoGetAttachedDevice(ptr)
@ stdcall IoGetAttachedDeviceReference(ptr) @ stdcall IoGetAttachedDeviceReference(ptr)
@ stub IoGetBaseFileSystemDeviceObject @ stub IoGetBaseFileSystemDeviceObject
......
...@@ -1543,6 +1543,7 @@ NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOI ...@@ -1543,6 +1543,7 @@ NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOI
PVOID WINAPI IoAllocateErrorLogEntry(PVOID,UCHAR); PVOID WINAPI IoAllocateErrorLogEntry(PVOID,UCHAR);
PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN); PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN);
PMDL WINAPI IoAllocateMdl(PVOID,ULONG,BOOLEAN,BOOLEAN,IRP*); PMDL WINAPI IoAllocateMdl(PVOID,ULONG,BOOLEAN,BOOLEAN,IRP*);
PIO_WORKITEM WINAPI IoAllocateWorkItem(PDEVICE_OBJECT);
PDEVICE_OBJECT WINAPI IoAttachDeviceToDeviceStack(PDEVICE_OBJECT,PDEVICE_OBJECT); PDEVICE_OBJECT WINAPI IoAttachDeviceToDeviceStack(PDEVICE_OBJECT,PDEVICE_OBJECT);
PIRP WINAPI IoBuildDeviceIoControlRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PVOID,ULONG,BOOLEAN,PKEVENT,IO_STATUS_BLOCK*); PIRP WINAPI IoBuildDeviceIoControlRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PVOID,ULONG,BOOLEAN,PKEVENT,IO_STATUS_BLOCK*);
PIRP WINAPI IoBuildSynchronousFsdRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PLARGE_INTEGER,PKEVENT,IO_STATUS_BLOCK*); PIRP WINAPI IoBuildSynchronousFsdRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PLARGE_INTEGER,PKEVENT,IO_STATUS_BLOCK*);
...@@ -1557,6 +1558,7 @@ void WINAPI IoDeleteDriver(DRIVER_OBJECT*); ...@@ -1557,6 +1558,7 @@ void WINAPI IoDeleteDriver(DRIVER_OBJECT*);
NTSTATUS WINAPI IoDeleteSymbolicLink(UNICODE_STRING*); NTSTATUS WINAPI IoDeleteSymbolicLink(UNICODE_STRING*);
void WINAPI IoFreeIrp(IRP*); void WINAPI IoFreeIrp(IRP*);
void WINAPI IoFreeMdl(MDL*); void WINAPI IoFreeMdl(MDL*);
void WINAPI IoFreeWorkItem(PIO_WORKITEM);
PEPROCESS WINAPI IoGetCurrentProcess(void); PEPROCESS WINAPI IoGetCurrentProcess(void);
NTSTATUS WINAPI IoGetDeviceInterfaces(const GUID*,PDEVICE_OBJECT,ULONG,PWSTR*); NTSTATUS WINAPI IoGetDeviceInterfaces(const GUID*,PDEVICE_OBJECT,ULONG,PWSTR*);
NTSTATUS WINAPI IoGetDeviceObjectPointer(UNICODE_STRING*,ACCESS_MASK,PFILE_OBJECT*,PDEVICE_OBJECT*); NTSTATUS WINAPI IoGetDeviceObjectPointer(UNICODE_STRING*,ACCESS_MASK,PFILE_OBJECT*,PDEVICE_OBJECT*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment