ReactOS 0.4.16-dev-983-g23ad936
timerqueue.c File Reference
#include <rtl.h>
#include <debug.h>
#include <wine/list.h>
Include dependency graph for timerqueue.c:

Go to the source code of this file.

Classes

struct  queue_timer
 
struct  timer_queue
 

Macros

#define NDEBUG
 
#define EXPIRE_NEVER   (~(ULONGLONG) 0)
 
#define TIMER_QUEUE_MAGIC   0x516d6954 /* TimQ */
 

Functions

NTSTATUS RtlpInitializeTimerThread (VOID)
 
static PLARGE_INTEGER get_nt_timeout (PLARGE_INTEGER pTime, ULONG timeout)
 
NTSTATUS WINAPI RtlSetTimer (HANDLE TimerQueue, PHANDLE NewTimer, WAITORTIMERCALLBACKFUNC Callback, PVOID Parameter, DWORD DueTime, DWORD Period, ULONG Flags)
 
NTSTATUS NTAPI RtlCancelTimer (HANDLE TimerQueue, HANDLE Timer)
 
NTSTATUS NTAPI RtlDeleteTimerQueue (HANDLE TimerQueue)
 

Variables

PRTL_START_POOL_THREAD RtlpStartThreadFunc
 
PRTL_EXIT_POOL_THREAD RtlpExitThreadFunc
 
HANDLE TimerThreadHandle = NULL
 

Macro Definition Documentation

◆ EXPIRE_NEVER

#define EXPIRE_NEVER   (~(ULONGLONG) 0)

Definition at line 64 of file timerqueue.c.

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file timerqueue.c.

◆ TIMER_QUEUE_MAGIC

#define TIMER_QUEUE_MAGIC   0x516d6954 /* TimQ */

Definition at line 65 of file timerqueue.c.

Function Documentation

◆ get_nt_timeout()

static PLARGE_INTEGER get_nt_timeout ( PLARGE_INTEGER  pTime,
ULONG  timeout 
)
inlinestatic

Definition at line 32 of file timerqueue.c.

33{
34 if (timeout == INFINITE) return NULL;
35 pTime->QuadPart = (ULONGLONG)timeout * -10000;
36 return pTime;
37}
#define NULL
Definition: types.h:112
#define INFINITE
Definition: serial.h:102
Definition: dhcpd.h:245
uint64_t ULONGLONG
Definition: typedefs.h:67
_In_ PCCERT_CONTEXT _In_opt_ LPFILETIME pTime
Definition: wincrypt.h:4837

◆ RtlCancelTimer()

NTSTATUS NTAPI RtlCancelTimer ( HANDLE  TimerQueue,
HANDLE  Timer 
)

Definition at line 92 of file timerqueue.c.

93{
94 return RtlDeleteTimer(TimerQueue, Timer, NULL);
95}
NTSYSAPI NTSTATUS NTAPI RtlDeleteTimer(_In_ HANDLE TimerQueue, _In_ HANDLE Timer, _In_ HANDLE CompletionEvent)

◆ RtlDeleteTimerQueue()

NTSTATUS NTAPI RtlDeleteTimerQueue ( HANDLE  TimerQueue)

Definition at line 102 of file timerqueue.c.

103{
105}
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
NTSYSAPI NTSTATUS NTAPI RtlDeleteTimerQueueEx(_In_ HANDLE TimerQueue, _In_opt_ HANDLE CompletionEvent)

◆ RtlpInitializeTimerThread()

NTSTATUS RtlpInitializeTimerThread ( VOID  )

Definition at line 27 of file timerqueue.c.

28{
30}
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42

Referenced by RtlpQueueWorkerThread().

◆ RtlSetTimer()

NTSTATUS WINAPI RtlSetTimer ( HANDLE  TimerQueue,
PHANDLE  NewTimer,
WAITORTIMERCALLBACKFUNC  Callback,
PVOID  Parameter,
DWORD  DueTime,
DWORD  Period,
ULONG  Flags 
)

Definition at line 69 of file timerqueue.c.

77{
78 return RtlCreateTimer(TimerQueue,
79 NewTimer,
82 DueTime,
83 Period,
84 Flags);
85}
NTSYSAPI NTSTATUS NTAPI RtlCreateTimer(_In_ HANDLE TimerQueue, _In_ PHANDLE phNewTimer, _In_ WAITORTIMERCALLBACKFUNC Callback, _In_ PVOID Parameter, _In_ ULONG DueTime, _In_ ULONG Period, _In_ ULONG Flags)
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
_In_ WDFTIMER _In_ LONGLONG DueTime
Definition: wdftimer.h:190
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ LARGE_INTEGER _In_ ULONG Period
Definition: kefuncs.h:1313
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:336

Variable Documentation

◆ RtlpExitThreadFunc

PRTL_EXIT_POOL_THREAD RtlpExitThreadFunc
extern

◆ RtlpStartThreadFunc

PRTL_START_POOL_THREAD RtlpStartThreadFunc
extern

Definition at line 45 of file workitem.c.

Referenced by RtlpStartWorkerThread(), and RtlSetThreadPoolStartFunc().

◆ TimerThreadHandle

HANDLE TimerThreadHandle = NULL

Definition at line 24 of file timerqueue.c.

Referenced by RtlpQueueWorkerThread().