class DECLSPEC_ALIGN()

in src/framework/shared/inc/private/common/fxsyncrequest.hpp [43:119]


class DECLSPEC_ALIGN(MEMORY_ALLOCATION_ALIGNMENT) FxSyncRequest : protected FxRequestBase {

public:
    // Create a sync request that allocates its own PIRP
    FxSyncRequest(
        __in PFX_DRIVER_GLOBALS FxDriverGlobals,
        __in_opt FxRequestContext* Context,
        __in_opt WDFREQUEST Request = NULL
        );

    ~FxSyncRequest();

    //
    // FxObject overrides
    //
    VOID
    SelfDestruct(
        VOID
        );

protected:
     PVOID
     operator new(
         __in size_t Size
         )
     {
         UNREFERENCED_PARAMETER(Size);

         ASSERTMSG("FxSyncRequest::operator new called, should only be"
                      " declared on the stack\n", FALSE);

         return NULL;
     }

public:
    
    NTSTATUS
    Initialize(
        VOID
        )
    {
        NTSTATUS status;

#if (FX_CORE_MODE == FX_CORE_USER_MODE)
        //
        // FxCrEvent initialization can fail in UMDF so check for status.
        //
        status = m_DestroyedEvent.Initialize();
        if (!NT_SUCCESS(status)) {
            return status;
        }
#else
        UNREFERENCED_PARAMETER(status);
        DO_NOTHING();
#endif
        return STATUS_SUCCESS;
    }

    //
    // Since this object can be sitting on a list which is access by another
    // thread and that thread will expect lifetime semantics from AddRef and
    // Release, we need to hold up destruction of the object until all
    // references are released.  This event will be set when the last reference
    // is dropped.
    //
    FxCREvent m_DestroyedEvent;

    //
    // By default, this will point to this object.  If AssignRequestHandle is
    // called, it will point to the underlying object for that handle.  Since
    // this object derives from FxRequestBase as protected, this field is how
    // the object is used as an FxRequestBase* pointer.
    //
    FxRequestBase* m_TrueRequest;

    BOOLEAN m_ClearContextOnDestroy;
};