ReactOS  0.4.15-dev-499-g1f31905
rxworkq.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _RX_WORK_QUEUE_ITEM_
 
struct  _RX_WORK_DISPATCH_ITEM_
 
struct  _RX_WORK_QUEUE_RUNDOWN_CONTEXT_
 
struct  _RX_WORK_QUEUE_
 
struct  _RX_WORK_QUEUE_DISPATCHER_
 
struct  _RX_DISPATCHER_
 

Typedefs

typedef VOID(NTAPIPRX_WORKERTHREAD_ROUTINE) (_In_ PVOID Context)
 
typedef struct _RX_WORK_QUEUE_ITEM_ RX_WORK_QUEUE_ITEM
 
typedef struct _RX_WORK_QUEUE_ITEM_PRX_WORK_QUEUE_ITEM
 
typedef struct _RX_WORK_DISPATCH_ITEM_ RX_WORK_DISPATCH_ITEM
 
typedef struct _RX_WORK_DISPATCH_ITEM_PRX_WORK_DISPATCH_ITEM
 
typedef enum _RX_WORK_QUEUE_STATE_ RX_WORK_QUEUE_STATE
 
typedef enum _RX_WORK_QUEUE_STATE_PRX_WORK_QUEUE_STATE
 
typedef struct _RX_WORK_QUEUE_RUNDOWN_CONTEXT_ RX_WORK_QUEUE_RUNDOWN_CONTEXT
 
typedef struct _RX_WORK_QUEUE_RUNDOWN_CONTEXT_PRX_WORK_QUEUE_RUNDOWN_CONTEXT
 
typedef struct _RX_WORK_QUEUE_ RX_WORK_QUEUE
 
typedef struct _RX_WORK_QUEUE_PRX_WORK_QUEUE
 
typedef struct _RX_WORK_QUEUE_DISPATCHER_ RX_WORK_QUEUE_DISPATCHER
 
typedef struct _RX_WORK_QUEUE_DISPATCHER_PRX_WORK_QUEUE_DISPATCHER
 
typedef enum _RX_DISPATCHER_STATE_ RX_DISPATCHER_STATE
 
typedef enum _RX_DISPATCHER_STATE_PRX_DISPATCHER_STATE
 
typedef struct _RX_DISPATCHER_ RX_DISPATCHER
 
typedef struct _RX_DISPATCHER_PRX_DISPATCHER
 

Enumerations

enum  _RX_WORK_QUEUE_STATE_ { RxWorkQueueActive, RxWorkQueueInactive, RxWorkQueueRundownInProgress }
 
enum  _RX_DISPATCHER_STATE_ { RxDispatcherActive, RxDispatcherInactive }
 

Functions

NTSTATUS NTAPI RxPostToWorkerThread (_In_ PRDBSS_DEVICE_OBJECT pMRxDeviceObject, _In_ WORK_QUEUE_TYPE WorkQueueType, _In_ PRX_WORK_QUEUE_ITEM pWorkQueueItem, _In_ PRX_WORKERTHREAD_ROUTINE Routine, _In_ PVOID pContext)
 
NTSTATUS NTAPI RxDispatchToWorkerThread (_In_ PRDBSS_DEVICE_OBJECT pMRxDeviceObject, _In_ WORK_QUEUE_TYPE WorkQueueType, _In_ PRX_WORKERTHREAD_ROUTINE Routine, _In_ PVOID pContext)
 
NTSTATUS NTAPI RxInitializeDispatcher (VOID)
 
NTSTATUS RxInitializeMRxDispatcher (_Inout_ PRDBSS_DEVICE_OBJECT pMRxDeviceObject)
 

Typedef Documentation

◆ PRX_DISPATCHER

◆ PRX_DISPATCHER_STATE

◆ PRX_WORK_DISPATCH_ITEM

◆ PRX_WORK_QUEUE

◆ PRX_WORK_QUEUE_DISPATCHER

◆ PRX_WORK_QUEUE_ITEM

◆ PRX_WORK_QUEUE_RUNDOWN_CONTEXT

◆ PRX_WORK_QUEUE_STATE

◆ PRX_WORKERTHREAD_ROUTINE

typedef VOID(NTAPI * PRX_WORKERTHREAD_ROUTINE) (_In_ PVOID Context)

Definition at line 6 of file rxworkq.h.

◆ RX_DISPATCHER

◆ RX_DISPATCHER_STATE

◆ RX_WORK_DISPATCH_ITEM

◆ RX_WORK_QUEUE

◆ RX_WORK_QUEUE_DISPATCHER

◆ RX_WORK_QUEUE_ITEM

◆ RX_WORK_QUEUE_RUNDOWN_CONTEXT

◆ RX_WORK_QUEUE_STATE

Enumeration Type Documentation

◆ _RX_DISPATCHER_STATE_

Enumerator
RxDispatcherActive 
RxDispatcherInactive 

Definition at line 65 of file rxworkq.h.

66 {
enum _RX_DISPATCHER_STATE_ * PRX_DISPATCHER_STATE
enum _RX_DISPATCHER_STATE_ RX_DISPATCHER_STATE

◆ _RX_WORK_QUEUE_STATE_

Enumerator
RxWorkQueueActive 
RxWorkQueueInactive 
RxWorkQueueRundownInProgress 

Definition at line 22 of file rxworkq.h.

23 {
enum _RX_WORK_QUEUE_STATE_ * PRX_WORK_QUEUE_STATE
enum _RX_WORK_QUEUE_STATE_ RX_WORK_QUEUE_STATE

Function Documentation

◆ RxDispatchToWorkerThread()

NTSTATUS NTAPI RxDispatchToWorkerThread ( _In_ PRDBSS_DEVICE_OBJECT  pMRxDeviceObject,
_In_ WORK_QUEUE_TYPE  WorkQueueType,
_In_ PRX_WORKERTHREAD_ROUTINE  Routine,
_In_ PVOID  pContext 
)

◆ RxInitializeDispatcher()

NTSTATUS NTAPI RxInitializeDispatcher ( VOID  )

Definition at line 4688 of file rxce.c.

4690 {
4691  NTSTATUS Status;
4692  HANDLE ThreadHandle;
4693 
4694  PAGED_CODE();
4695 
4698 
4699  /* Set appropriate timeouts: 10s & 60s */
4700  RxWorkQueueWaitInterval[CriticalWorkQueue].QuadPart = -10 * 1000 * 1000 * 10;
4701  RxWorkQueueWaitInterval[DelayedWorkQueue].QuadPart = -10 * 1000 * 1000 * 10;
4702  RxWorkQueueWaitInterval[HyperCriticalWorkQueue].QuadPart = -10 * 1000 * 1000 * 10;
4703  RxSpinUpDispatcherWaitInterval.QuadPart = -60 * 1000 * 1000 * 10;
4704 
4708 
4709  /* Initialize our dispatchers */
4711  if (!NT_SUCCESS(Status))
4712  {
4713  return Status;
4714  }
4715 
4717  if (!NT_SUCCESS(Status))
4718  {
4719  return Status;
4720  }
4721 
4722  /* And start them */
4730  if (NT_SUCCESS(Status))
4731  {
4732  ZwClose(ThreadHandle);
4733  }
4734 
4735  return Status;
4736 }
KEVENT SpinUpRequestsTearDownEvent
Definition: rxworkq.h:80
NTSTATUS RxInitializeWorkQueueDispatcher(PRX_WORK_QUEUE_DISPATCHER Dispatcher)
Definition: rxce.c:5090
#define PROCESS_ALL_ACCESS
Definition: nt_native.h:1324
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
LONG NumberOfProcessors
Definition: rxworkq.h:73
LONG NTSTATUS
Definition: precomp.h:26
volatile LONG NumberOfWorkerThreads
Definition: rxstruc.h:66
LARGE_INTEGER RxSpinUpDispatcherWaitInterval
Definition: rxce.c:133
VOID NTAPI RxSpinUpRequestsDispatcher(PVOID Dispatcher)
Definition: rxce.c:8039
PRDBSS_DEVICE_OBJECT RxFileSystemDeviceObject
Definition: rdbss.c:573
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:238
smooth NULL
Definition: ftsmooth.c:416
PEPROCESS NTAPI IoGetCurrentProcess(VOID)
Definition: util.c:139
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
LIST_ENTRY SpinUpRequests
Definition: rxworkq.h:77
PRX_WORK_QUEUE_DISPATCHER pWorkQueueDispatcher
Definition: rxworkq.h:75
RX_DISPATCHER_CONTEXT DispatcherContext
Definition: rxstruc.h:126
LARGE_INTEGER RxWorkQueueWaitInterval[RxMaximumWorkQueue]
Definition: rxce.c:132
Status
Definition: gdiplustypes.h:24
KEVENT SpinUpRequestsEvent
Definition: rxworkq.h:79
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
NTSTATUS NTAPI PsCreateSystemThread(OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN HANDLE ProcessHandle, IN PCLIENT_ID ClientId, IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext)
Definition: thread.c:602
RX_DISPATCHER RxDispatcher
Definition: rxce.c:134
PEPROCESS OwnerProcess
Definition: rxworkq.h:74
KSPIN_LOCK SpinUpRequestsLock
Definition: rxworkq.h:78
volatile PKEVENT pTearDownEvent
Definition: rxstruc.h:67
RX_DISPATCHER_STATE State
Definition: rxworkq.h:76
NTSTATUS RxInitializeMRxDispatcher(IN OUT PRDBSS_DEVICE_OBJECT pMRxDeviceObject)
Definition: rxce.c:4860
LONGLONG QuadPart
Definition: typedefs.h:113
#define PAGED_CODE()
RX_WORK_QUEUE_DISPATCHER RxDispatcherWorkQueues
Definition: rxce.c:135

Referenced by RxDriverEntry().

◆ RxInitializeMRxDispatcher()

NTSTATUS RxInitializeMRxDispatcher ( _Inout_ PRDBSS_DEVICE_OBJECT  pMRxDeviceObject)

Referenced by RxStartMinirdr().

◆ RxPostToWorkerThread()

NTSTATUS NTAPI RxPostToWorkerThread ( _In_ PRDBSS_DEVICE_OBJECT  pMRxDeviceObject,
_In_ WORK_QUEUE_TYPE  WorkQueueType,
_In_ PRX_WORK_QUEUE_ITEM  pWorkQueueItem,
_In_ PRX_WORKERTHREAD_ROUTINE  Routine,
_In_ PVOID  pContext 
)

Definition at line 6400 of file rxce.c.

6406 {
6407  /* Initialize work queue item */
6408  pWorkQueueItem->List.Flink = NULL;
6409  pWorkQueueItem->WorkerRoutine = Routine;
6410  pWorkQueueItem->Parameter = pContext;
6411 
6412  /* And insert it in the work queue */
6413  return RxInsertWorkQueueItem(pMRxDeviceObject, WorkQueueType, pWorkQueueItem);
6414 }
NTSTATUS RxInsertWorkQueueItem(PRDBSS_DEVICE_OBJECT pMRxDeviceObject, WORK_QUEUE_TYPE WorkQueueType, PRX_WORK_QUEUE_ITEM WorkQueueItem)
Definition: rxce.c:5161
smooth NULL
Definition: ftsmooth.c:416

Referenced by RxCompleteSrvOpenKeyAssociation(), RxpDispatchChangeBufferingStateRequests(), and RxTimerDispatch().