ReactOS  0.4.15-dev-5455-g015cd25
fxobjectstatemachine.cpp File Reference
#include "fxobjectpch.hpp"
Include dependency graph for fxobjectstatemachine.cpp:

Go to the source code of this file.

Functions

 _Releases_lock_ (this->m_SpinLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) BOOLEAN FxObject
 
 _When_ (Unlock, _Releases_lock_(this->m_SpinLock.m_Lock)) __drv_when(Unlock
 
 __drv_requiresIRQL (DISPATCH_LEVEL)) VOID FxObject
 

Function Documentation

◆ __drv_requiresIRQL()

__drv_requiresIRQL ( DISPATCH_LEVEL  )

Definition at line 1197 of file fxobjectstatemachine.cpp.

1203 {
1204  SetObjectStateLocked(FxObjectStateDeletedAndDisposed);
1205 
1206  if (Unlock) {
1207  m_SpinLock.Release(OldIrql);
1208  }
1209 
1210  DestroyChildren();
1211 
1212  //
1213  // Release the final reference on the object
1214  //
1215  RELEASE(NULL);
1216 }
#define RELEASE(_tag)
Definition: fxobject.hpp:50
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:792
#define NULL
Definition: types.h:112

◆ _Releases_lock_()

_Releases_lock_ ( this->m_SpinLock.  m_Lock)

Definition at line 783 of file fxobjectstatemachine.cpp.

809 {
810  static const USHORT edFlags = (FXOBJECT_FLAGS_DELETECALLED |
812 
813  SetObjectStateLocked(FxObjectStateDisposingDisposeChildren);
814 
815  if (DisposeChildrenWorker(FxObjectStateDeferedDisposing, OldIrql, CanDefer)) {
816  //
817  // Upon returning TRUE, the lock is still held
818  //
819 
820  //
821  // If this object was early disposed externally, destroy the children
822  // immediately (FxRequest relies on this so that the WDFMEMORYs created
823  // for probed and locked buffers are freed before the request is
824  // completed.)
825  //
826  // Otherwise, wait for DeleteObject or ParentDeleteEvent() to occur.
827  //
828  if ((m_ObjectFlags & edFlags) == edFlags) {
829  //
830  // This will drop the lock
831  //
832  DeletedAndDisposedWorkerLocked(OldIrql, FALSE);
833  }
834  else {
835  //
836  // Will wait for the parent deleted event
837  //
838  SetObjectStateLocked(FxObjectStateDisposed);
839  }
840 
841  return TRUE;
842  }
843  else {
844  //
845  // Upon return FALSE, the lock was released and a work item was
846  // queued to dispose of children at passive level
847  //
848  DO_NOTHING();
849 
850  return FALSE;
851  }
852 }
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:792
unsigned short USHORT
Definition: pedump.c:61
#define DO_NOTHING()
Definition: mxgeneral.h:32

◆ _When_()

_When_ ( Unlock  ,
_Releases_lock_(this->m_SpinLock.m_Lock)   
)