FreeRDP
TestSynchWaitableTimerAPC.c File Reference
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/sysinfo.h>

Functions

static VOID CALLBACK TimerAPCProc (LPVOID lpArg, DWORD dwTimerLowValue, DWORD dwTimerHighValue)
 
int TestSynchWaitableTimerAPC (int argc, char *argv[])
 

Variables

static int g_Count = 0
 
static HANDLE g_Event = NULL
 

Function Documentation

int TestSynchWaitableTimerAPC ( int  argc,
char *  argv[] 
)

See Remarks at https://msdn.microsoft.com/en-us/library/windows/desktop/ms686786(v=vs.85).aspx The SetWaitableTimer completion routine is executed by the thread that activates the timer using SetWaitableTimer. However, the thread must be in an ALERTABLE state.

Note: On WIN32 we need to use WaitForSingleObjectEx with parameter bAlertable = TRUE However, WinPR currently (May 2016) does not have a working WaitForSingleObjectEx implementation but its non-WIN32 WaitForSingleObject implementations seem to be alertable by WinPR's timer implementations.

Here is the call graph for this function:

Here is the caller graph for this function:

static VOID CALLBACK TimerAPCProc ( LPVOID  lpArg,
DWORD  dwTimerLowValue,
DWORD  dwTimerHighValue 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int g_Count = 0
static
HANDLE g_Event = NULL
static