FreeRDP
TestSynchInit.c File Reference
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/interlocked.h>

Macros

#define TEST_NUM_THREADS   100
 
#define TEST_NUM_FAILURES   10
 

Functions

static BOOL CALLBACK TestOnceFunction (PINIT_ONCE once, PVOID param, PVOID *context)
 
static DWORD WINAPI TestThreadFunction (LPVOID lpParam)
 
int TestSynchInit (int argc, char *argv[])
 

Variables

static INIT_ONCE initOnceTest = INIT_ONCE_STATIC_INIT
 
static HANDLE hStartEvent = NULL
 
static LONG * pErrors = NULL
 
static LONG * pTestThreadFunctionCalls = NULL
 
static LONG * pTestOnceFunctionCalls = NULL
 
static LONG * pInitOnceExecuteOnceCalls = NULL
 

Macro Definition Documentation

◆ TEST_NUM_FAILURES

#define TEST_NUM_FAILURES   10

◆ TEST_NUM_THREADS

#define TEST_NUM_THREADS   100

Function Documentation

◆ TestOnceFunction()

static BOOL CALLBACK TestOnceFunction ( PINIT_ONCE  once,
PVOID  param,
PVOID *  context 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestSynchInit()

int TestSynchInit ( int  argc,
char *  argv[] 
)
Here is the call graph for this function:

◆ TestThreadFunction()

static DWORD WINAPI TestThreadFunction ( LPVOID  lpParam)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ hStartEvent

HANDLE hStartEvent = NULL
static

◆ initOnceTest

INIT_ONCE initOnceTest = INIT_ONCE_STATIC_INIT
static

◆ pErrors

LONG* pErrors = NULL
static

◆ pInitOnceExecuteOnceCalls

LONG* pInitOnceExecuteOnceCalls = NULL
static

◆ pTestOnceFunctionCalls

LONG* pTestOnceFunctionCalls = NULL
static

◆ pTestThreadFunctionCalls

LONG* pTestThreadFunctionCalls = NULL
static