VirtualBox

Ignore:
Timestamp:
Jun 14, 2007 11:18:15 AM (18 years ago)
Author:
vboxsync
Message:

Removed workaround for allocating the event structure in non-paged memory. Not necessary and only hides the real problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp

    r3090 r3105  
    143143    IO_STATUS_BLOCK ioStatusBlock;
    144144
    145     KEVENT *pEvent;
    146 #ifdef KEVENT_STACK_ALLOC
    147     KEVENT eventAlloc;
    148     pEvent = &eventAlloc;
    149 #else
    150     pEvent = (KEVENT *)ExAllocatePool (NonPagedPool, sizeof (KEVENT));
    151     if (!pEvent) return VERR_NO_MEMORY;
    152 #endif /* KEVENT_STACK_ALLOC */
    153     KeInitializeEvent (pEvent, NotificationEvent, FALSE);
     145    KEVENT Event;
     146    KeInitializeEvent (&Event, NotificationEvent, FALSE);
    154147
    155148    PIRP irp = IoBuildDeviceIoControlRequest (u32Function,
     
    159152                                              pvData,
    160153                                              cbData,
    161                                               FALSE,
    162                                               pEvent,
     154                                              FALSE, /* external */
     155                                              &Event,
    163156                                              &ioStatusBlock);
    164157    if (irp == NULL)
    165158    {
    166159        Log(("vbglDriverIOCtl: IoBuildDeviceIoControlRequest failed\n"));
    167 #ifndef KEVENT_STACK_ALLOC
    168         ExFreePool (pEvent);
    169 #endif /* KEVENT_STACK_ALLOC */
    170160        return VERR_NO_MEMORY;
    171161    }
     
    176166    {
    177167        Log(("vbglDriverIOCtl: STATUS_PENDING\n"));
    178         rc = KeWaitForSingleObject(pEvent,
     168        rc = KeWaitForSingleObject(&Event,
    179169                                   Executive,
    180170                                   KernelMode,
     
    187177    if (!NT_SUCCESS(rc))
    188178        Log(("vbglDriverIOCtl: IoCallDriver failed with ntstatus=%x\n", rc));
    189 
    190 #ifndef KEVENT_STACK_ALLOC
    191     ExFreePool (pEvent);
    192 #endif /* KEVENT_STACK_ALLOC */
    193179
    194180    return NT_SUCCESS(rc)? VINF_SUCCESS: VERR_VBGL_IOCTL_FAILED;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette