diff options
Diffstat (limited to 'src/object.rs')
| -rw-r--r-- | src/object.rs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/object.rs b/src/object.rs new file mode 100644 index 0000000..ab34aeb --- /dev/null +++ b/src/object.rs @@ -0,0 +1,44 @@ +//! Kernel Objects. + +use ::basedef::*; +use ::device_object::PDEVICE_OBJECT; +use ::irp::IRP; + + +#[repr(C)] +pub struct WAIT_CONTEXT_BLOCK +{ + WaitQueueEntry: *mut KDEVICE_QUEUE_ENTRY, + DeviceRoutine: extern "system" fn (_obj: PDEVICE_OBJECT, _irp: *mut IRP, *mut u8, *mut u8) -> IO_ALLOCATION_ACTION, + DeviceContext: *mut u8, + NumberOfMapRegisters: u32, + DeviceObject: *mut u8, + CurrentIrp: *mut u8, + BufferChainingDpc: * mut u8, +} + +#[repr(C)] +pub enum IO_ALLOCATION_ACTION +{ + KeepObject = 0x01, + DeallocateObject = 0x02, + DeallocateObjectKeepRegisters = 0x03, +} + +#[repr(C)] +pub struct KDEVICE_QUEUE_ENTRY +{ + DeviceListEntry: LIST_ENTRY, + SortKey: u32, + Inserted: bool, +} + +#[repr(C)] +pub struct KDEVICE_QUEUE +{ + Type: u16, + Size: u16, + DeviceListHead: LIST_ENTRY, + Lock: KSPIN_LOCK, + Busy: bool, +} |