FreeRDP
|
#include <winpr/config.h>
#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 struct timespec | ts_from_ns (void) |
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) |
#define CONST_NEEDED const |
#define STATIC_NEEDED static |
#define TAG WINPR_TAG("sync.wait") |
WinPR: Windows Portable Runtime Synchronization Functions
Copyright 2012 Marc-Andre Moreau marca Copyright 2014 Hardening ndre .more au@g mail. comconta ct@h arden ing- consu ltin 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.
STATIC_NEEDED int pthread_mutex_timedlock | ( | pthread_mutex_t * | mutex, |
CONST_NEEDED struct timespec * | timeout | ||
) |
DWORD SignalObjectAndWait | ( | HANDLE | hObjectToSignal, |
HANDLE | hObjectToWaitOn, | ||
DWORD | dwMilliseconds, | ||
BOOL | bAlertable | ||
) |
|
static |
|
static |
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
|
static |
WaitForSingleObject WaitForSingleObjectEx WaitForMultipleObjectsEx SignalObjectAndWait
DWORD WaitForMultipleObjects | ( | DWORD | nCount, |
const HANDLE * | lpHandles, | ||
BOOL | bWaitAll, | ||
DWORD | dwMilliseconds | ||
) |
DWORD WaitForMultipleObjectsEx | ( | DWORD | nCount, |
const HANDLE * | lpHandles, | ||
BOOL | bWaitAll, | ||
DWORD | dwMilliseconds, | ||
BOOL | bAlertable | ||
) |
DWORD WaitForSingleObject | ( | HANDLE | hHandle, |
DWORD | dwMilliseconds | ||
) |
DWORD WaitForSingleObjectEx | ( | HANDLE | hHandle, |
DWORD | dwMilliseconds, | ||
BOOL | bAlertable | ||
) |