FreeRDP
wait.c File Reference
#include <winpr/assert.h>
#include <errno.h>
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/platform.h>
#include <winpr/sysinfo.h>
#include "synch.h"
#include "pollset.h"
#include "../thread/thread.h"
#include <winpr/thread.h>
#include <winpr/debug.h>
#include "../log.h"
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>
#include "../handle/handle.h"
#include "../pipe/pipe.h"
#include <pthread.h>

Macros

#define TAG   WINPR_TAG("sync.wait")
 
#define CONST_NEEDED   const
 
#define STATIC_NEEDED   static
 

Functions

static long long ts_difftime (const struct timespec *o, const struct timespec *n)
 
STATIC_NEEDED int pthread_mutex_timedlock (pthread_mutex_t *mutex, CONST_NEEDED struct timespec *timeout)
 
static void ts_add_ms (struct timespec *ts, DWORD dwMilliseconds)
 
DWORD WaitForSingleObjectEx (HANDLE hHandle, DWORD dwMilliseconds, BOOL bAlertable)
 
DWORD WaitForSingleObject (HANDLE hHandle, DWORD dwMilliseconds)
 
DWORD WaitForMultipleObjectsEx (DWORD nCount, const HANDLE *lpHandles, BOOL bWaitAll, DWORD dwMilliseconds, BOOL bAlertable)
 
DWORD WaitForMultipleObjects (DWORD nCount, const HANDLE *lpHandles, BOOL bWaitAll, DWORD dwMilliseconds)
 
DWORD SignalObjectAndWait (HANDLE hObjectToSignal, HANDLE hObjectToWaitOn, DWORD dwMilliseconds, BOOL bAlertable)
 

Macro Definition Documentation

◆ CONST_NEEDED

#define CONST_NEEDED   const

◆ STATIC_NEEDED

#define STATIC_NEEDED   static

◆ TAG

#define TAG   WINPR_TAG("sync.wait")

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 Hardening conta.nosp@m.ct@h.nosp@m.arden.nosp@m.ing-.nosp@m.consu.nosp@m.ltin.nosp@m.g.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.

Function Documentation

◆ pthread_mutex_timedlock()

STATIC_NEEDED int pthread_mutex_timedlock ( pthread_mutex_t *  mutex,
CONST_NEEDED struct timespec *  timeout 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SignalObjectAndWait()

DWORD SignalObjectAndWait ( HANDLE  hObjectToSignal,
HANDLE  hObjectToWaitOn,
DWORD  dwMilliseconds,
BOOL  bAlertable 
)
Here is the call graph for this function:

◆ ts_add_ms()

static void ts_add_ms ( struct timespec *  ts,
DWORD  dwMilliseconds 
)
static
Here is the caller graph for this function:

◆ ts_difftime()

static long long ts_difftime ( const struct timespec *  o,
const struct timespec *  n 
)
static

WaitForSingleObject WaitForSingleObjectEx WaitForMultipleObjectsEx SignalObjectAndWait Drop in replacement for pthread_mutex_timedlock http://code.google.com/p/android/issues/detail?id=7807 http://aleksmaus.blogspot.ca/2011/12/missing-pthreadmutextimedlock-on.html

Here is the caller graph for this function:

◆ WaitForMultipleObjects()

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:

◆ WaitForMultipleObjectsEx()

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:

◆ WaitForSingleObject()

DWORD WaitForSingleObject ( HANDLE  hHandle,
DWORD  dwMilliseconds 
)
Here is the call graph for this function:

◆ WaitForSingleObjectEx()

DWORD WaitForSingleObjectEx ( HANDLE  hHandle,
DWORD  dwMilliseconds,
BOOL  bAlertable 
)
Here is the call graph for this function:
Here is the caller graph for this function: