FreeRDP
|
#include <winpr/config.h>
#include <winpr/synch.h>
#include <winpr/debug.h>
#include <winpr/wlog.h>
#include <winpr/string.h>
#include "synch.h"
#include <errno.h>
#include "../handle/handle.h"
#include "../log.h"
Macros | |
#define | TAG WINPR_TAG("sync.mutex") |
Functions | |
static BOOL | MutexCloseHandle (HANDLE handle) |
static BOOL | MutexIsHandled (HANDLE handle) |
static int | MutexGetFd (HANDLE handle) |
HANDLE | CreateMutexW (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner, LPCWSTR lpName) |
HANDLE | CreateMutexA (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner, LPCSTR lpName) |
HANDLE | CreateMutexExA (LPSECURITY_ATTRIBUTES lpMutexAttributes, LPCSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess) |
HANDLE | CreateMutexExW (LPSECURITY_ATTRIBUTES lpMutexAttributes, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess) |
HANDLE | OpenMutexA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName) |
HANDLE | OpenMutexW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName) |
BOOL | ReleaseMutex (HANDLE hMutex) |
Variables | |
static HANDLE_OPS | ops |
#define TAG WINPR_TAG("sync.mutex") |
WinPR: Windows Portable Runtime Synchronization Functions
Copyright 2012 Marc-Andre Moreau marca ndre .more au@g mail. 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.
HANDLE CreateMutexA | ( | LPSECURITY_ATTRIBUTES | lpMutexAttributes, |
BOOL | bInitialOwner, | ||
LPCSTR | lpName | ||
) |
HANDLE CreateMutexExA | ( | LPSECURITY_ATTRIBUTES | lpMutexAttributes, |
LPCSTR | lpName, | ||
DWORD | dwFlags, | ||
DWORD | dwDesiredAccess | ||
) |
HANDLE CreateMutexExW | ( | LPSECURITY_ATTRIBUTES | lpMutexAttributes, |
LPCWSTR | lpName, | ||
DWORD | dwFlags, | ||
DWORD | dwDesiredAccess | ||
) |
HANDLE CreateMutexW | ( | LPSECURITY_ATTRIBUTES | lpMutexAttributes, |
BOOL | bInitialOwner, | ||
LPCWSTR | lpName | ||
) |
|
static |
Note: unfortunately we may not return FALSE here since CloseHandle(hmutex) on Windows always seems to succeed independently of the mutex object locking state
|
static |
|
static |
HANDLE OpenMutexA | ( | DWORD | dwDesiredAccess, |
BOOL | bInheritHandle, | ||
LPCSTR | lpName | ||
) |
HANDLE OpenMutexW | ( | DWORD | dwDesiredAccess, |
BOOL | bInheritHandle, | ||
LPCWSTR | lpName | ||
) |
BOOL ReleaseMutex | ( | HANDLE | hMutex | ) |