ReactOS 0.4.17-dev-1281-g065abb3
clientif.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UcxUsbdHandle
 

Macros

#define UCX_USBDI_VERSION   0x600
 

Functions

VOID NTAPI UcxDropLeakedUsbdHandles (_In_ UcxUsbDevice *Device)
 
BOOLEAN NTAPI UcxAnyUsbdHandleHasVerifier (_In_ UcxUsbDevice *Device)
 

Macro Definition Documentation

◆ UCX_USBDI_VERSION

#define UCX_USBDI_VERSION   0x600

Definition at line 11 of file clientif.h.

Function Documentation

◆ UcxAnyUsbdHandleHasVerifier()

BOOLEAN NTAPI UcxAnyUsbdHandleHasVerifier ( _In_ UcxUsbDevice *  Device)

TRUE when any client registered against the device runs with USB verifier.

Definition at line 646 of file clientif.cpp.

648{
650
651 for (Entry = Device->m_UsbdHandleList.Flink; Entry != &Device->m_UsbdHandleList; Entry = Entry->Flink)
652 {
653 if (CONTAINING_RECORD(Entry, UcxUsbdHandle, m_DeviceLink)->m_VerifierEnabled)
654 return TRUE;
655 }
656
657 return FALSE;
658}
PLIST_ENTRY Entry
Definition: devhcd.cpp:1262
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
_Must_inspect_result_ _In_ PUCXHUB_DEVICE_CREATE_INFO _Out_ UCXUSBDEVICE * Device
Definition: hubucx.h:258
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by UcxValidatePipeHandle().

◆ UcxDropLeakedUsbdHandles()

VOID NTAPI UcxDropLeakedUsbdHandles ( _In_ UcxUsbDevice *  Device)

At device delete: what clients failed to unregister.

Definition at line 615 of file clientif.cpp.

617{
618 BOOLEAN Verifying = Device->m_Controller->m_DriverVerifierEnabled;
621
622 SpinLockGuard Guard(&Device->m_UsbdHandleLock);
623
624 for (Entry = Device->m_UsbdHandleList.Flink; Entry != &Device->m_UsbdHandleList; Entry = Entry->Flink)
625 {
627
628 DPRINT1("USBD handle %p of client %p leaked on device %p\n", Handle, Handle->m_ClientDeviceObject, Device);
629
630 if (Verifying || Handle->m_VerifierEnabled)
631 {
635 (ULONG_PTR)Handle->m_ClientDeviceObject,
636 0);
637 }
638
639 ObDereferenceObject(Handle->m_ClientDeviceObject);
640 Handle->m_Orphaned = TRUE;
641 }
642}
unsigned char BOOLEAN
Definition: actypes.h:127
#define DPRINT1
Definition: precomp.h:8
DECLSPEC_NORETURN VOID NTAPI KeBugCheckEx(IN ULONG BugCheckCode, IN ULONG_PTR BugCheckParameter1, IN ULONG_PTR BugCheckParameter2, IN ULONG_PTR BugCheckParameter3, IN ULONG_PTR BugCheckParameter4)
Definition: debug.c:485
#define UCX_USB3_HANDLE_LEAKED
Definition: clientxrb.h:29
#define UCX_BUGCHECK_USB3
Definition: clientxrb.h:22
ULONG Handle
Definition: gdb_input.c:15
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define ObDereferenceObject
Definition: obfuncs.h:203

Referenced by UcxUsbDevice::DeleteFromHub().