ReactOS  0.4.14-dev-98-gb0d4763
service_group.cpp File Reference
#include "private.hpp"
#include <debug.h>
Include dependency graph for service_group.cpp:

Go to the source code of this file.

Classes

struct  GROUP_ENTRY
 
class  CServiceGroup
 

Macros

#define NDEBUG
 

Typedefs

typedef struct GROUP_ENTRYPGROUP_ENTRY
 

Functions

VOID NTAPI IServiceGroupDpc (IN struct _KDPC *Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
 
NTSTATUS NTAPI PcNewServiceGroup (OUT PSERVICEGROUP *OutServiceGroup, IN PUNKNOWN OuterUnknown OPTIONAL)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file service_group.cpp.

Typedef Documentation

◆ PGROUP_ENTRY

Function Documentation

◆ IServiceGroupDpc()

VOID NTAPI IServiceGroupDpc ( IN struct _KDPC Dpc,
IN PVOID  DeferredContext,
IN PVOID  SystemArgument1,
IN PVOID  SystemArgument2 
)

Definition at line 252 of file service_group.cpp.

258 {
259  PLIST_ENTRY CurEntry;
262 
263  // acquire service group list lock
265 
266  // grab first entry
267  CurEntry = This->m_ServiceSinkHead.Flink;
268 
269  // loop the list and call the attached service sink/group
270  while (CurEntry != &This->m_ServiceSinkHead)
271  {
272  //grab current entry
274 
275  // call service sink/group
276  Entry->pServiceSink->RequestService();
277 
278  // move to next entry
279  CurEntry = CurEntry->Flink;
280  }
281 
282  // release service group list lock
284 }
struct _Entry Entry
Definition: kefuncs.h:640
VOID NTAPI KeAcquireSpinLockAtDpcLevel(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:192
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
VOID NTAPI KeReleaseSpinLockFromDpcLevel(IN PKSPIN_LOCK SpinLock)
Definition: spinlock.c:215
Definition: typedefs.h:117
struct GROUP_ENTRY * PGROUP_ENTRY
base of all file and directory entries
Definition: entries.h:82
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:675

◆ PcNewServiceGroup()

NTSTATUS NTAPI PcNewServiceGroup ( OUT PSERVICEGROUP OutServiceGroup,
IN PUNKNOWN OuterUnknown  OPTIONAL 
)

Definition at line 329 of file service_group.cpp.

332 {
335 
336  DPRINT("PcNewServiceGroup entered\n");
337 
338  //FIXME support aggregation
339  PC_ASSERT(OuterUnknown == NULL);
340 
341  // allocate a service group object
342  This = new(NonPagedPool, TAG_PORTCLASS)CServiceGroup(OuterUnknown);
343 
344  if (!This)
345  {
346  // out of memory
348  }
349 
350  // request IServiceSink interface
351  Status = This->QueryInterface(IID_IServiceSink, (PVOID*)OutServiceGroup);
352 
353  if (!NT_SUCCESS(Status))
354  {
355  // failed to acquire service sink interface
356  delete This;
357  return Status;
358  }
359 
360  // done
361  return Status;
362 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define PC_ASSERT(exp)
Definition: usbehci.h:17
#define TAG_PORTCLASS
Definition: private.hpp:24
LONG NTSTATUS
Definition: precomp.h:26
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:24