FreeRDP
include/winpr/synch.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/winpr.h>
#include <winpr/wtypes.h>
#include <winpr/error.h>
#include <winpr/handle.h>
#include <winpr/nt.h>

Data Structures

struct  PRTL_CRITICAL_SECTION
 
struct  PREASON_CONTEXT
 
struct  PRTL_RUN_ONCE
 
struct  PRTL_BARRIER
 

Macros

#define CreateMutex   CreateMutexA
 
#define CreateMutexEx   CreateMutexExA
 
#define OpenMutex   OpenMutexA
 
#define CreateSemaphore   CreateSemaphoreA
 
#define OpenSemaphore   OpenSemaphoreA
 
#define CreateEvent   CreateEventA
 
#define CreateEventEx   CreateEventExA
 
#define OpenEvent   OpenEventA
 
#define INFINITE   0xFFFFFFFF
 
#define WAIT_OBJECT_0   0x00000000L
 
#define WAIT_ABANDONED   0x00000080L
 
#define WAIT_TIMEOUT   0x00000102L
 
#define WAIT_FAILED   ((DWORD) 0xFFFFFFFF)
 
#define MAXIMUM_WAIT_OBJECTS   64
 
#define CREATE_WAITABLE_TIMER_MANUAL_RESET   0x00000001
 
#define CreateWaitableTimer   CreateWaitableTimerA
 
#define CreateWaitableTimerEx   CreateWaitableTimerExA
 
#define OpenWaitableTimer   OpenWaitableTimerA
 
#define WT_EXECUTEDEFAULT   0x00000000
 
#define WT_EXECUTEINIOTHREAD   0x00000001
 
#define WT_EXECUTEINUITHREAD   0x00000002
 
#define WT_EXECUTEINWAITTHREAD   0x00000004
 
#define WT_EXECUTEONLYONCE   0x00000008
 
#define WT_EXECUTELONGFUNCTION   0x00000010
 
#define WT_EXECUTEINTIMERTHREAD   0x00000020
 
#define WT_EXECUTEINPERSISTENTIOTHREAD   0x00000040
 
#define WT_EXECUTEINPERSISTENTTHREAD   0x00000080
 
#define WT_TRANSFER_IMPERSONATION   0x00000100
 
#define _RTL_RUN_ONCE_DEF
 
#define RTL_RUN_ONCE_INIT   { 0 }
 
#define RTL_RUN_ONCE_CHECK_ONLY   0x00000001
 
#define RTL_RUN_ONCE_ASYNC   0x00000002
 
#define RTL_RUN_ONCE_INIT_FAILED   0x00000004
 
#define RTL_RUN_ONCE_CTX_RESERVED_BITS   2
 
#define INIT_ONCE_STATIC_INIT   RTL_RUN_ONCE_INIT
 
#define InitOnceBeginInitialize   winpr_InitOnceBeginInitialize
 
#define InitOnceComplete   winpr_InitOnceComplete
 
#define InitOnceExecuteOnce   winpr_InitOnceExecuteOnce
 
#define InitOnceInitialize   winpr_InitOnceInitialize
 
#define WINPR_SYNCHRONIZATION_BARRIER   1
 
#define SYNCHRONIZATION_BARRIER_FLAGS_SPIN_ONLY   0x01
 
#define SYNCHRONIZATION_BARRIER_FLAGS_BLOCK_ONLY   0x02
 
#define SYNCHRONIZATION_BARRIER_FLAGS_NO_DELETE   0x04
 
#define InitializeSynchronizationBarrier   winpr_InitializeSynchronizationBarrier
 
#define EnterSynchronizationBarrier   winpr_EnterSynchronizationBarrier
 
#define DeleteSynchronizationBarrier   winpr_DeleteSynchronizationBarrier
 
#define CreateFileDescriptorEvent   CreateFileDescriptorEventA
 

Typedefs

typedef PVOID RTL_SRWLOCK
 
typedef RTL_SRWLOCK SRWLOCK
 
typedef RTL_SRWLOCKPSRWLOCK
 
typedef PVOID RTL_CONDITION_VARIABLE
 
typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE
 
typedef RTL_CONDITION_VARIABLEPCONDITION_VARIABLE
 
typedef RTL_CRITICAL_SECTION CRITICAL_SECTION
 
typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION
 
typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION
 
typedef VOID(* PTIMERAPCROUTINE) (LPVOID lpArgToCompletionRoutine, DWORD dwTimerLowValue, DWORD dwTimerHighValue)
 
typedef VOID(* WAITORTIMERCALLBACK) (PVOID lpParameter, BOOLEAN TimerOrWaitFired)
 
typedef ULONG CALLBACK RTL_RUN_ONCE_INIT_FN(PRTL_RUN_ONCE RunOnce, PVOID Parameter, PVOID *Context)
 
typedef RTL_RUN_ONCE_INIT_FNPRTL_RUN_ONCE_INIT_FN
 
typedef RTL_RUN_ONCE INIT_ONCE
 
typedef PRTL_RUN_ONCE PINIT_ONCE
 
typedef PRTL_RUN_ONCE LPINIT_ONCE
 
typedef BOOL(CALLBACK * PINIT_ONCE_FN) (PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
 
typedef RTL_BARRIER SYNCHRONIZATION_BARRIER
 
typedef PRTL_BARRIER PSYNCHRONIZATION_BARRIER
 
typedef PRTL_BARRIER LPSYNCHRONIZATION_BARRIER
 

Functions

WINPR_API HANDLE CreateMutexA (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner, LPCSTR lpName)
 
WINPR_API HANDLE CreateMutexW (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner, LPCWSTR lpName)
 
WINPR_API HANDLE CreateMutexExA (LPSECURITY_ATTRIBUTES lpMutexAttributes, LPCTSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess)
 
WINPR_API HANDLE CreateMutexExW (LPSECURITY_ATTRIBUTES lpMutexAttributes, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess)
 
WINPR_API HANDLE OpenMutexA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
 
WINPR_API HANDLE OpenMutexW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
 
WINPR_API BOOL ReleaseMutex (HANDLE hMutex)
 
WINPR_API HANDLE CreateSemaphoreA (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCSTR lpName)
 
WINPR_API HANDLE CreateSemaphoreW (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCWSTR lpName)
 
WINPR_API HANDLE OpenSemaphoreA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
 
WINPR_API HANDLE OpenSemaphoreW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
 
WINPR_API BOOL ReleaseSemaphore (HANDLE hSemaphore, LONG lReleaseCount, LPLONG lpPreviousCount)
 
WINPR_API HANDLE CreateEventA (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName)
 
WINPR_API HANDLE CreateEventW (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCWSTR lpName)
 
WINPR_API HANDLE CreateEventExA (LPSECURITY_ATTRIBUTES lpEventAttributes, LPCSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess)
 
WINPR_API HANDLE CreateEventExW (LPSECURITY_ATTRIBUTES lpEventAttributes, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess)
 
WINPR_API HANDLE OpenEventA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
 
WINPR_API HANDLE OpenEventW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
 
WINPR_API BOOL SetEvent (HANDLE hEvent)
 
WINPR_API BOOL ResetEvent (HANDLE hEvent)
 
WINPR_API VOID InitializeSRWLock (PSRWLOCK SRWLock)
 
WINPR_API VOID AcquireSRWLockExclusive (PSRWLOCK SRWLock)
 
WINPR_API VOID AcquireSRWLockShared (PSRWLOCK SRWLock)
 
WINPR_API BOOL TryAcquireSRWLockExclusive (PSRWLOCK SRWLock)
 
WINPR_API BOOL TryAcquireSRWLockShared (PSRWLOCK SRWLock)
 
WINPR_API VOID ReleaseSRWLockExclusive (PSRWLOCK SRWLock)
 
WINPR_API VOID ReleaseSRWLockShared (PSRWLOCK SRWLock)
 
WINPR_API VOID InitializeCriticalSection (LPCRITICAL_SECTION lpCriticalSection)
 
WINPR_API BOOL InitializeCriticalSectionEx (LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount, DWORD Flags)
 
WINPR_API BOOL InitializeCriticalSectionAndSpinCount (LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount)
 
WINPR_API DWORD SetCriticalSectionSpinCount (LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount)
 
WINPR_API VOID EnterCriticalSection (LPCRITICAL_SECTION lpCriticalSection)
 
WINPR_API BOOL TryEnterCriticalSection (LPCRITICAL_SECTION lpCriticalSection)
 
WINPR_API VOID LeaveCriticalSection (LPCRITICAL_SECTION lpCriticalSection)
 
WINPR_API VOID DeleteCriticalSection (LPCRITICAL_SECTION lpCriticalSection)
 
WINPR_API VOID Sleep (DWORD dwMilliseconds)
 
WINPR_API DWORD SleepEx (DWORD dwMilliseconds, BOOL bAlertable)
 
WINPR_API VOID WakeByAddressAll (PVOID Address)
 
WINPR_API VOID WakeByAddressSingle (PVOID Address)
 
WINPR_API BOOL WaitOnAddress (VOID volatile *Address, PVOID CompareAddress, SIZE_T AddressSize, DWORD dwMilliseconds)
 
WINPR_API DWORD WaitForSingleObject (HANDLE hHandle, DWORD dwMilliseconds)
 
WINPR_API DWORD WaitForSingleObjectEx (HANDLE hHandle, DWORD dwMilliseconds, BOOL bAlertable)
 
WINPR_API DWORD WaitForMultipleObjects (DWORD nCount, const HANDLE *lpHandles, BOOL bWaitAll, DWORD dwMilliseconds)
 
WINPR_API DWORD WaitForMultipleObjectsEx (DWORD nCount, const HANDLE *lpHandles, BOOL bWaitAll, DWORD dwMilliseconds, BOOL bAlertable)
 
WINPR_API DWORD SignalObjectAndWait (HANDLE hObjectToSignal, HANDLE hObjectToWaitOn, DWORD dwMilliseconds, BOOL bAlertable)
 
WINPR_API HANDLE CreateWaitableTimerA (LPSECURITY_ATTRIBUTES lpTimerAttributes, BOOL bManualReset, LPCSTR lpTimerName)
 
WINPR_API HANDLE CreateWaitableTimerW (LPSECURITY_ATTRIBUTES lpTimerAttributes, BOOL bManualReset, LPCWSTR lpTimerName)
 
WINPR_API HANDLE CreateWaitableTimerExA (LPSECURITY_ATTRIBUTES lpTimerAttributes, LPCSTR lpTimerName, DWORD dwFlags, DWORD dwDesiredAccess)
 
WINPR_API HANDLE CreateWaitableTimerExW (LPSECURITY_ATTRIBUTES lpTimerAttributes, LPCWSTR lpTimerName, DWORD dwFlags, DWORD dwDesiredAccess)
 
WINPR_API BOOL SetWaitableTimer (HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, BOOL fResume)
 
WINPR_API BOOL SetWaitableTimerEx (HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay)
 
WINPR_API HANDLE OpenWaitableTimerA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpTimerName)
 
WINPR_API HANDLE OpenWaitableTimerW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpTimerName)
 
WINPR_API BOOL CancelWaitableTimer (HANDLE hTimer)
 
WINPR_API HANDLE CreateTimerQueue (void)
 
WINPR_API BOOL DeleteTimerQueue (HANDLE TimerQueue)
 
WINPR_API BOOL DeleteTimerQueueEx (HANDLE TimerQueue, HANDLE CompletionEvent)
 
WINPR_API BOOL CreateTimerQueueTimer (PHANDLE phNewTimer, HANDLE TimerQueue, WAITORTIMERCALLBACK Callback, PVOID Parameter, DWORD DueTime, DWORD Period, ULONG Flags)
 
WINPR_API BOOL ChangeTimerQueueTimer (HANDLE TimerQueue, HANDLE Timer, ULONG DueTime, ULONG Period)
 
WINPR_API BOOL DeleteTimerQueueTimer (HANDLE TimerQueue, HANDLE Timer, HANDLE CompletionEvent)
 
WINPR_API BOOL winpr_InitOnceBeginInitialize (LPINIT_ONCE lpInitOnce, DWORD dwFlags, PBOOL fPending, LPVOID *lpContext)
 
WINPR_API BOOL winpr_InitOnceComplete (LPINIT_ONCE lpInitOnce, DWORD dwFlags, LPVOID lpContext)
 
WINPR_API BOOL winpr_InitOnceExecuteOnce (PINIT_ONCE InitOnce, PINIT_ONCE_FN InitFn, PVOID Parameter, LPVOID *Context)
 
WINPR_API VOID winpr_InitOnceInitialize (PINIT_ONCE InitOnce)
 
WINPR_API BOOL WINAPI winpr_InitializeSynchronizationBarrier (LPSYNCHRONIZATION_BARRIER lpBarrier, LONG lTotalThreads, LONG lSpinCount)
 
WINPR_API BOOL WINAPI winpr_EnterSynchronizationBarrier (LPSYNCHRONIZATION_BARRIER lpBarrier, DWORD dwFlags)
 
WINPR_API BOOL WINAPI winpr_DeleteSynchronizationBarrier (LPSYNCHRONIZATION_BARRIER lpBarrier)
 
WINPR_API VOID USleep (DWORD dwMicroseconds)
 
WINPR_API HANDLE CreateFileDescriptorEventW (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, int FileDescriptor, ULONG mode)
 
WINPR_API HANDLE CreateFileDescriptorEventA (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, int FileDescriptor, ULONG mode)
 
WINPR_API HANDLE CreateWaitObjectEvent (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, void *pObject)
 
WINPR_API int GetEventFileDescriptor (HANDLE hEvent)
 
WINPR_API int SetEventFileDescriptor (HANDLE hEvent, int FileDescriptor, ULONG mode)
 
WINPR_API voidGetEventWaitObject (HANDLE hEvent)
 

Macro Definition Documentation

#define _RTL_RUN_ONCE_DEF
#define CREATE_WAITABLE_TIMER_MANUAL_RESET   0x00000001
#define CreateEvent   CreateEventA
#define CreateEventEx   CreateEventExA
#define CreateFileDescriptorEvent   CreateFileDescriptorEventA
#define CreateMutex   CreateMutexA
#define CreateMutexEx   CreateMutexExA
#define CreateSemaphore   CreateSemaphoreA
#define CreateWaitableTimer   CreateWaitableTimerA
#define CreateWaitableTimerEx   CreateWaitableTimerExA
#define DeleteSynchronizationBarrier   winpr_DeleteSynchronizationBarrier
#define EnterSynchronizationBarrier   winpr_EnterSynchronizationBarrier
#define INFINITE   0xFFFFFFFF
#define INIT_ONCE_STATIC_INIT   RTL_RUN_ONCE_INIT
#define InitializeSynchronizationBarrier   winpr_InitializeSynchronizationBarrier
#define InitOnceBeginInitialize   winpr_InitOnceBeginInitialize
#define InitOnceComplete   winpr_InitOnceComplete
#define InitOnceExecuteOnce   winpr_InitOnceExecuteOnce
#define InitOnceInitialize   winpr_InitOnceInitialize
#define MAXIMUM_WAIT_OBJECTS   64
#define OpenEvent   OpenEventA
#define OpenMutex   OpenMutexA
#define OpenSemaphore   OpenSemaphoreA
#define OpenWaitableTimer   OpenWaitableTimerA
#define RTL_RUN_ONCE_ASYNC   0x00000002
#define RTL_RUN_ONCE_CHECK_ONLY   0x00000001
#define RTL_RUN_ONCE_CTX_RESERVED_BITS   2
#define RTL_RUN_ONCE_INIT   { 0 }
#define RTL_RUN_ONCE_INIT_FAILED   0x00000004
#define SYNCHRONIZATION_BARRIER_FLAGS_BLOCK_ONLY   0x02
#define SYNCHRONIZATION_BARRIER_FLAGS_NO_DELETE   0x04
#define SYNCHRONIZATION_BARRIER_FLAGS_SPIN_ONLY   0x01
#define WAIT_ABANDONED   0x00000080L
#define WAIT_FAILED   ((DWORD) 0xFFFFFFFF)
#define WAIT_OBJECT_0   0x00000000L
#define WAIT_TIMEOUT   0x00000102L
#define WINPR_SYNCHRONIZATION_BARRIER   1
#define WT_EXECUTEDEFAULT   0x00000000

Timer-Queue Timer

#define WT_EXECUTEINIOTHREAD   0x00000001
#define WT_EXECUTEINPERSISTENTIOTHREAD   0x00000040
#define WT_EXECUTEINPERSISTENTTHREAD   0x00000080
#define WT_EXECUTEINTIMERTHREAD   0x00000020
#define WT_EXECUTEINUITHREAD   0x00000002
#define WT_EXECUTEINWAITTHREAD   0x00000004
#define WT_EXECUTELONGFUNCTION   0x00000010
#define WT_EXECUTEONLYONCE   0x00000008
#define WT_TRANSFER_IMPERSONATION   0x00000100

Typedef Documentation

typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION
typedef PRTL_RUN_ONCE LPINIT_ONCE
typedef PRTL_BARRIER LPSYNCHRONIZATION_BARRIER
typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION
typedef PRTL_RUN_ONCE PINIT_ONCE
typedef BOOL(CALLBACK * PINIT_ONCE_FN) (PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
typedef RTL_SRWLOCK * PSRWLOCK
typedef PRTL_BARRIER PSYNCHRONIZATION_BARRIER
typedef VOID(* PTIMERAPCROUTINE) (LPVOID lpArgToCompletionRoutine, DWORD dwTimerLowValue, DWORD dwTimerHighValue)
typedef PVOID RTL_CONDITION_VARIABLE
typedef ULONG CALLBACK RTL_RUN_ONCE_INIT_FN(PRTL_RUN_ONCE RunOnce, PVOID Parameter, PVOID *Context)
typedef PVOID RTL_SRWLOCK
typedef VOID(* WAITORTIMERCALLBACK) (PVOID lpParameter, BOOLEAN TimerOrWaitFired)

Function Documentation

WINPR_API VOID AcquireSRWLockExclusive ( PSRWLOCK  SRWLock)
WINPR_API VOID AcquireSRWLockShared ( PSRWLOCK  SRWLock)
WINPR_API BOOL CancelWaitableTimer ( HANDLE  hTimer)

Here is the call graph for this function:

WINPR_API BOOL ChangeTimerQueueTimer ( HANDLE  TimerQueue,
HANDLE  Timer,
ULONG  DueTime,
ULONG  Period 
)

Here is the call graph for this function:

WINPR_API HANDLE CreateEventA ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
LPCSTR  lpName 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API HANDLE CreateEventExA ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
LPCSTR  lpName,
DWORD  dwFlags,
DWORD  dwDesiredAccess 
)
WINPR_API HANDLE CreateEventExW ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
LPCWSTR  lpName,
DWORD  dwFlags,
DWORD  dwDesiredAccess 
)
WINPR_API HANDLE CreateEventW ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
LPCWSTR  lpName 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API HANDLE CreateFileDescriptorEventA ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
int  FileDescriptor,
ULONG  mode 
)

Here is the call graph for this function:

WINPR_API HANDLE CreateFileDescriptorEventW ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
int  FileDescriptor,
ULONG  mode 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API HANDLE CreateMutexA ( LPSECURITY_ATTRIBUTES  lpMutexAttributes,
BOOL  bInitialOwner,
LPCSTR  lpName 
)

WinPR: Windows Portable Runtime Synchronization Functions

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2014 Thincast Technologies GmbH Copyright 2014 Norbert Federa norbe.nosp@m.rt.f.nosp@m.edera.nosp@m.@thi.nosp@m.ncast.nosp@m..com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Here is the call graph for this function:

WINPR_API HANDLE CreateMutexExA ( LPSECURITY_ATTRIBUTES  lpMutexAttributes,
LPCTSTR  lpName,
DWORD  dwFlags,
DWORD  dwDesiredAccess 
)

Here is the call graph for this function:

WINPR_API HANDLE CreateMutexExW ( LPSECURITY_ATTRIBUTES  lpMutexAttributes,
LPCWSTR  lpName,
DWORD  dwFlags,
DWORD  dwDesiredAccess 
)

Here is the call graph for this function:

WINPR_API HANDLE CreateMutexW ( LPSECURITY_ATTRIBUTES  lpMutexAttributes,
BOOL  bInitialOwner,
LPCWSTR  lpName 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API HANDLE CreateSemaphoreA ( LPSECURITY_ATTRIBUTES  lpSemaphoreAttributes,
LONG  lInitialCount,
LONG  lMaximumCount,
LPCSTR  lpName 
)

Here is the call graph for this function:

WINPR_API HANDLE CreateSemaphoreW ( LPSECURITY_ATTRIBUTES  lpSemaphoreAttributes,
LONG  lInitialCount,
LONG  lMaximumCount,
LPCWSTR  lpName 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API HANDLE CreateTimerQueue ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL CreateTimerQueueTimer ( PHANDLE  phNewTimer,
HANDLE  TimerQueue,
WAITORTIMERCALLBACK  Callback,
PVOID  Parameter,
DWORD  DueTime,
DWORD  Period,
ULONG  Flags 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API HANDLE CreateWaitableTimerA ( LPSECURITY_ATTRIBUTES  lpTimerAttributes,
BOOL  bManualReset,
LPCSTR  lpTimerName 
)

Waitable Timer

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API HANDLE CreateWaitableTimerExA ( LPSECURITY_ATTRIBUTES  lpTimerAttributes,
LPCSTR  lpTimerName,
DWORD  dwFlags,
DWORD  dwDesiredAccess 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API HANDLE CreateWaitableTimerExW ( LPSECURITY_ATTRIBUTES  lpTimerAttributes,
LPCWSTR  lpTimerName,
DWORD  dwFlags,
DWORD  dwDesiredAccess 
)

Here is the call graph for this function:

WINPR_API HANDLE CreateWaitableTimerW ( LPSECURITY_ATTRIBUTES  lpTimerAttributes,
BOOL  bManualReset,
LPCWSTR  lpTimerName 
)

Here is the call graph for this function:

WINPR_API HANDLE CreateWaitObjectEvent ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
void pObject 
)

Returns an event based on the handle returned by GetEventWaitObject()

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API VOID DeleteCriticalSection ( LPCRITICAL_SECTION  lpCriticalSection)

Here is the caller graph for this function:

WINPR_API BOOL DeleteTimerQueue ( HANDLE  TimerQueue)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL DeleteTimerQueueEx ( HANDLE  TimerQueue,
HANDLE  CompletionEvent 
)

Quote from MSDN regarding CompletionEvent: If this parameter is INVALID_HANDLE_VALUE, the function waits for all callback functions to complete before returning. If this parameter is NULL, the function marks the timer for deletion and returns immediately.

Note: The current WinPR implementation implicitly waits for any callback functions to complete (see pthread_join above)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL DeleteTimerQueueTimer ( HANDLE  TimerQueue,
HANDLE  Timer,
HANDLE  CompletionEvent 
)

Quote from MSDN regarding CompletionEvent: If this parameter is INVALID_HANDLE_VALUE, the function waits for all callback functions to complete before returning. If this parameter is NULL, the function marks the timer for deletion and returns immediately.

Note: The current WinPR implementation implicitly waits for any callback functions to complete (see cond_mutex usage)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API VOID EnterCriticalSection ( LPCRITICAL_SECTION  lpCriticalSection)

On some operating systems sched_yield is a stub. usleep should at least trigger a context switch if any thread is waiting. A ThreadYield() would be nice in winpr ...

Here is the call graph for this function:

WINPR_API int GetEventFileDescriptor ( HANDLE  hEvent)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API void* GetEventWaitObject ( HANDLE  hEvent)

Returns platform-specific wait object as a void pointer

On Windows, the returned object is the same as the hEvent argument and is an event HANDLE usable in WaitForMultipleObjects

On other platforms, the returned object can be cast to an int to obtain a file descriptor usable in select()

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API VOID InitializeCriticalSection ( LPCRITICAL_SECTION  lpCriticalSection)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL InitializeCriticalSectionAndSpinCount ( LPCRITICAL_SECTION  lpCriticalSection,
DWORD  dwSpinCount 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL InitializeCriticalSectionEx ( LPCRITICAL_SECTION  lpCriticalSection,
DWORD  dwSpinCount,
DWORD  Flags 
)

See http://msdn.microsoft.com/en-us/library/ff541979(v=vs.85).aspx

  • The LockCount field indicates the number of times that any thread has called the EnterCriticalSection routine for this critical section, minus one. This field starts at -1 for an unlocked critical section. Each call of EnterCriticalSection increments this value; each call of LeaveCriticalSection decrements it.
  • The RecursionCount field indicates the number of times that the owning thread has called EnterCriticalSection for this critical section.

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API VOID InitializeSRWLock ( PSRWLOCK  SRWLock)

WinPR: Windows Portable Runtime Synchronization Functions

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. InitializeSRWLock AcquireSRWLockExclusive AcquireSRWLockShared TryAcquireSRWLockExclusive TryAcquireSRWLockShared ReleaseSRWLockExclusive ReleaseSRWLockShared

WINPR_API VOID LeaveCriticalSection ( LPCRITICAL_SECTION  lpCriticalSection)

Here is the call graph for this function:

WINPR_API HANDLE OpenEventA ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCSTR  lpName 
)
WINPR_API HANDLE OpenEventW ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCWSTR  lpName 
)
WINPR_API HANDLE OpenMutexA ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCSTR  lpName 
)
WINPR_API HANDLE OpenMutexW ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCWSTR  lpName 
)
WINPR_API HANDLE OpenSemaphoreA ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCSTR  lpName 
)
WINPR_API HANDLE OpenSemaphoreW ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCWSTR  lpName 
)
WINPR_API HANDLE OpenWaitableTimerA ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCSTR  lpTimerName 
)
WINPR_API HANDLE OpenWaitableTimerW ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCWSTR  lpTimerName 
)
WINPR_API BOOL ReleaseMutex ( HANDLE  hMutex)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL ReleaseSemaphore ( HANDLE  hSemaphore,
LONG  lReleaseCount,
LPLONG  lpPreviousCount 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API VOID ReleaseSRWLockExclusive ( PSRWLOCK  SRWLock)
WINPR_API VOID ReleaseSRWLockShared ( PSRWLOCK  SRWLock)
WINPR_API BOOL ResetEvent ( HANDLE  hEvent)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API DWORD SetCriticalSectionSpinCount ( LPCRITICAL_SECTION  lpCriticalSection,
DWORD  dwSpinCount 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL SetEvent ( HANDLE  hEvent)

Here is the call graph for this function:

WINPR_API int SetEventFileDescriptor ( HANDLE  hEvent,
int  FileDescriptor,
ULONG  mode 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL SetWaitableTimer ( HANDLE  hTimer,
const LARGE_INTEGER *  lpDueTime,
LONG  lPeriod,
PTIMERAPCROUTINE  pfnCompletionRoutine,
LPVOID  lpArgToCompletionRoutine,
BOOL  fResume 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL SetWaitableTimerEx ( HANDLE  hTimer,
const LARGE_INTEGER *  lpDueTime,
LONG  lPeriod,
PTIMERAPCROUTINE  pfnCompletionRoutine,
LPVOID  lpArgToCompletionRoutine,
PREASON_CONTEXT  WakeContext,
ULONG  TolerableDelay 
)

Here is the call graph for this function:

WINPR_API DWORD SignalObjectAndWait ( HANDLE  hObjectToSignal,
HANDLE  hObjectToWaitOn,
DWORD  dwMilliseconds,
BOOL  bAlertable 
)

Here is the call graph for this function:

WINPR_API VOID Sleep ( DWORD  dwMilliseconds)

WinPR: Windows Portable Runtime Synchronization Functions

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Here is the caller graph for this function:

WINPR_API DWORD SleepEx ( DWORD  dwMilliseconds,
BOOL  bAlertable 
)
WINPR_API BOOL TryAcquireSRWLockExclusive ( PSRWLOCK  SRWLock)
WINPR_API BOOL TryAcquireSRWLockShared ( PSRWLOCK  SRWLock)
WINPR_API BOOL TryEnterCriticalSection ( LPCRITICAL_SECTION  lpCriticalSection)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API VOID USleep ( DWORD  dwMicroseconds)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API DWORD WaitForMultipleObjects ( DWORD  nCount,
const HANDLE *  lpHandles,
BOOL  bWaitAll,
DWORD  dwMilliseconds 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API DWORD WaitForMultipleObjectsEx ( DWORD  nCount,
const HANDLE *  lpHandles,
BOOL  bWaitAll,
DWORD  dwMilliseconds,
BOOL  bAlertable 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API DWORD WaitForSingleObject ( HANDLE  hHandle,
DWORD  dwMilliseconds 
)

Here is the call graph for this function:

WINPR_API DWORD WaitForSingleObjectEx ( HANDLE  hHandle,
DWORD  dwMilliseconds,
BOOL  bAlertable 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WINPR_API BOOL WaitOnAddress ( VOID volatile *  Address,
PVOID  CompareAddress,
SIZE_T  AddressSize,
DWORD  dwMilliseconds 
)
WINPR_API VOID WakeByAddressAll ( PVOID  Address)

WinPR: Windows Portable Runtime Synchronization Functions

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. WakeByAddressAll WakeByAddressSingle WaitOnAddress

WINPR_API VOID WakeByAddressSingle ( PVOID  Address)
WINPR_API BOOL WINAPI winpr_DeleteSynchronizationBarrier ( LPSYNCHRONIZATION_BARRIER  lpBarrier)
WINPR_API BOOL WINAPI winpr_EnterSynchronizationBarrier ( LPSYNCHRONIZATION_BARRIER  lpBarrier,
DWORD  dwFlags 
)
WINPR_API BOOL WINAPI winpr_InitializeSynchronizationBarrier ( LPSYNCHRONIZATION_BARRIER  lpBarrier,
LONG  lTotalThreads,
LONG  lSpinCount 
)
WINPR_API BOOL winpr_InitOnceBeginInitialize ( LPINIT_ONCE  lpInitOnce,
DWORD  dwFlags,
PBOOL  fPending,
LPVOID *  lpContext 
)
WINPR_API BOOL winpr_InitOnceComplete ( LPINIT_ONCE  lpInitOnce,
DWORD  dwFlags,
LPVOID  lpContext 
)
WINPR_API BOOL winpr_InitOnceExecuteOnce ( PINIT_ONCE  InitOnce,
PINIT_ONCE_FN  InitFn,
PVOID  Parameter,
LPVOID *  Context 
)

Here is the call graph for this function:

WINPR_API VOID winpr_InitOnceInitialize ( PINIT_ONCE  InitOnce)