ReactOS 0.4.15-dev-8119-g4fb2fdb
chew.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VOID ChewInit (PDEVICE_OBJECT DeviceObject)
 
VOID ChewShutdown (VOID)
 
BOOLEAN ChewCreate (VOID(*Worker)(PVOID), PVOID WorkerContext)
 

Function Documentation

◆ ChewCreate()

BOOLEAN ChewCreate ( VOID(*)(PVOID Worker,
PVOID  WorkerContext 
)

Creates and queues a work item.

Definition at line 61 of file workqueue.c.

62{
65 sizeof(WORK_ITEM),
66 CHEW_TAG);
67
68 if (Item)
69 {
71 if (!Item->WorkItem)
72 {
74 return FALSE;
75 }
76
77 Item->Worker = Worker;
78 Item->WorkerContext = WorkerContext;
82
83 return TRUE;
84 }
85 else
86 {
87 return FALSE;
88 }
89}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define NonPagedPool
Definition: env_spec_w32.h:307
VOID NTAPI KeClearEvent(IN PKEVENT Event)
Definition: eventobj.c:22
PLIST_ENTRY NTAPI ExInterlockedInsertTailList(IN OUT PLIST_ENTRY ListHead, IN OUT PLIST_ENTRY ListEntry, IN OUT PKSPIN_LOCK Lock)
Definition: interlocked.c:140
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
Definition: iowork.c:40
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
Definition: iowork.c:75
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
LIST_ENTRY WorkQueue
Definition: workqueue.c:16
#define CHEW_TAG
Definition: workqueue.c:13
PDEVICE_OBJECT WorkQueueDevice
Definition: workqueue.c:15
VOID NTAPI ChewWorkItem(PDEVICE_OBJECT DeviceObject, PVOID ChewItem)
Definition: workqueue.c:41
KSPIN_LOCK WorkQueueLock
Definition: workqueue.c:17
KEVENT WorkQueueClear
Definition: workqueue.c:18
@ DelayedWorkQueue
Definition: extypes.h:190

Referenced by CompleteBucket(), LanSubmitReceiveWork(), LoopTransmit(), and ProtocolStatus().

◆ ChewInit()

VOID ChewInit ( PDEVICE_OBJECT  DeviceObject)

Initialize CHEW, given a device object (since IoAllocateWorkItem relies on it).

Definition at line 28 of file workqueue.c.

29{
34}
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define KeInitializeSpinLock(sl)
Definition: env_spec_w32.h:604
@ NotificationEvent
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055

Referenced by DriverEntry().

◆ ChewShutdown()

VOID ChewShutdown ( VOID  )

Shutdown CHEW, waits for remaining work items.

Definition at line 36 of file workqueue.c.

37{
39}
#define NULL
Definition: types.h:112
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
#define KernelMode
Definition: asm.h:34
@ Executive
Definition: ketypes.h:415

Referenced by TiUnload().