41 PwrEventType = pParameters->EventNumber;
42 Code = pParameters->Code;
60 TRACE(
"Power event of type %d is currently UNIMPLEMENTED (code %lu)\n", PwrEventType,
Code);
88 PwrEventType = pParameters->EventNumber;
91 TRACE(
"Unknown event number found -> %d\n", PwrEventType);
144 Entry = pPowerCallout->Link.Flink;
150 return pPowerCalloutEntry;
180 pWin32PwrCallout !=
NULL;
189 ERR(
"Power state callout management is currently not implemented!\n");
282 ERR(
"Failed to allocate pool of memory for the power callout mutex\n");
300 ERR(
"Failed to reference the power callout event handle (Status 0x%08lx)\n",
Status);
330 pWin32PwrCallout !=
NULL;
376 TRACE(
"CSRSS is not running, bailing out\n");
384 ERR(
"Could not deploy power callout, invalid Win32 power parameters!\n");
392 if (pWin32PwrCallout ==
NULL)
394 ERR(
"Allocating memory for Win32 power callout failed\n");
401 pWin32PwrCallout->
Params.
Code = pWin32PwrEventParams->Code;
423 ERR(
"IntHandlePowerState is UNIMPLEMENTED\n");
#define DBG_DEFAULT_CHANNEL(ch)
#define NT_SUCCESS(StatCode)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define PsGetCurrentThread()
#define KeSetEvent(pEvt, foo, foo2)
#define InitializeListHead(ListHead)
enum _PSPOWEREVENTTYPE PSPOWEREVENTTYPE
#define ExFreePoolWithTag(_P, _T)
FORCEINLINE PVOID ExAllocatePoolZero(ULONG PoolType, SIZE_T NumberOfBytes, ULONG Tag)
POBJECT_TYPE ExEventObjectType
BOOLEAN NTAPI PsIsSystemThread(IN PETHREAD Thread)
#define STATUS_NOT_IMPLEMENTED
VOID FASTCALL UserLeave(VOID)
VOID FASTCALL UserEnterExclusive(VOID)
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
#define ASSERT_POWER_CALLOUT_LOCK_ACQUIRED()
FORCEINLINE VOID IntReleasePowerCalloutLock(VOID)
FORCEINLINE BOOL IntIsThreadWin32Thread(_In_ PETHREAD Thread)
FORCEINLINE VOID IntAcquirePowerCalloutLock(VOID)
BOOLEAN NTAPI KeIsAttachedProcess(VOID)
base of all file and directory entries
struct _LIST_ENTRY * Flink
PSPOWEREVENTTYPE EventNumber
WIN32_POWEREVENT_PARAMETERS Params
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
static int Link(const char **args)
_In_ UCHAR _In_ UCHAR _In_ ULONG Code
BOOL FASTCALL UserSendNotifyMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
static PWIN32POWERCALLOUT IntGetNextPowerCallout(_In_ PWIN32POWERCALLOUT pPowerCallout)
Gets the next pending power callout from the global queue list and returns it to the caller....
LIST_ENTRY gPowerCalloutsQueueList
PFAST_MUTEX gpPowerCalloutMutexLock
static VOID IntEnlistPowerCallout(_In_ PWIN32POWERCALLOUT pPowerCallout)
Enlists a newly allocated power callout into the queue list for later processing.
NTSTATUS NTAPI IntWin32PowerManagementCleanup(VOID)
Cleanup procedure that frees all the allocated resources by the power manager. It is triggered during...
static VOID IntHandlePowerEventWorker(_In_ PWIN32_POWEREVENT_PARAMETERS pParameters)
Handles a power event as a result from an incoming power callout from the kernel power manager.
NTSTATUS NTAPI IntHandlePowerState(_In_ PWIN32_POWERSTATE_PARAMETERS pWin32PwrStateParams)
Handles an incoming power state callout from the NT power manager.
NTSTATUS NTAPI IntInitWin32PowerManagement(_In_ HANDLE hPowerRequestEvent)
Initializes the power management side of Win32 kernel-mode subsystem component. This enables communic...
static NTSTATUS IntValidateWin32PowerParams(_In_ PWIN32_POWEREVENT_PARAMETERS pParameters)
Validates the power event parameters that come from a power callout from the kernel power manager.
static VOID IntDeployPowerCallout(VOID)
Deploys all pending power callouts to appropriate power callout workers.
NTSTATUS NTAPI IntHandlePowerEvent(_In_ PWIN32_POWEREVENT_PARAMETERS pWin32PwrEventParams)
Handles an incoming power event callout from the NT power manager.
PKTHREAD gpPowerCalloutMutexOwnerThread
PKEVENT gpPowerRequestCalloutEvent
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
#define ObDereferenceObject