FreeRDP
mutex.c File Reference
#include <winpr/synch.h>
#include <winpr/debug.h>
#include <winpr/wlog.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, LPCTSTR 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
 

Macro Definition Documentation

#define TAG   WINPR_TAG("sync.mutex")

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.

Function Documentation

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:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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:

BOOL MutexCloseHandle ( HANDLE  handle)
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

Here is the call graph for this function:

static int MutexGetFd ( HANDLE  handle)
static

Here is the call graph for this function:

static BOOL MutexIsHandled ( HANDLE  handle)
static

Here is the call graph for this function:

Here is the caller graph for this function:

HANDLE OpenMutexA ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCSTR  lpName 
)
HANDLE OpenMutexW ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCWSTR  lpName 
)
BOOL ReleaseMutex ( HANDLE  hMutex)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

HANDLE_OPS ops
static
Initial value:
=
{
NULL,
NULL
}
static BOOL MutexIsHandled(HANDLE handle)
Definition: mutex.c:41
if availableBytes return NULL
Definition: TPCircularBuffer.h:104
static int MutexGetFd(HANDLE handle)
Definition: mutex.c:54
static BOOL MutexCloseHandle(HANDLE handle)
Definition: mutex.c:66