FreeRDP
semaphore.c File Reference
#include <winpr/config.h>
#include <winpr/debug.h>
#include <winpr/synch.h>
#include "synch.h"
#include <errno.h>
#include "../handle/handle.h"
#include "../log.h"

Macros

#define TAG   WINPR_TAG("synch.semaphore")
 

Functions

static BOOL SemaphoreCloseHandle (HANDLE handle)
 
static BOOL SemaphoreIsHandled (HANDLE handle)
 
static int SemaphoreGetFd (HANDLE handle)
 
static DWORD SemaphoreCleanupHandle (HANDLE handle)
 
HANDLE CreateSemaphoreW (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCWSTR lpName)
 
HANDLE CreateSemaphoreA (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCSTR lpName)
 
HANDLE OpenSemaphoreW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
 
HANDLE OpenSemaphoreA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
 
BOOL ReleaseSemaphore (HANDLE hSemaphore, LONG lReleaseCount, LPLONG lpPreviousCount)
 

Variables

static HANDLE_OPS ops
 

Macro Definition Documentation

◆ TAG

#define TAG   WINPR_TAG("synch.semaphore")

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

◆ CreateSemaphoreA()

HANDLE CreateSemaphoreA ( LPSECURITY_ATTRIBUTES  lpSemaphoreAttributes,
LONG  lInitialCount,
LONG  lMaximumCount,
LPCSTR  lpName 
)
Here is the call graph for this function:

◆ CreateSemaphoreW()

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:

◆ OpenSemaphoreA()

HANDLE OpenSemaphoreA ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCSTR  lpName 
)

◆ OpenSemaphoreW()

HANDLE OpenSemaphoreW ( DWORD  dwDesiredAccess,
BOOL  bInheritHandle,
LPCWSTR  lpName 
)

◆ ReleaseSemaphore()

BOOL ReleaseSemaphore ( HANDLE  hSemaphore,
LONG  lReleaseCount,
LPLONG  lpPreviousCount 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SemaphoreCleanupHandle()

static DWORD SemaphoreCleanupHandle ( HANDLE  handle)
static
Here is the call graph for this function:

◆ SemaphoreCloseHandle()

BOOL SemaphoreCloseHandle ( HANDLE  handle)
static
Here is the call graph for this function:

◆ SemaphoreGetFd()

static int SemaphoreGetFd ( HANDLE  handle)
static
Here is the call graph for this function:

◆ SemaphoreIsHandled()

static BOOL SemaphoreIsHandled ( HANDLE  handle)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ops

HANDLE_OPS ops
static
Initial value:
NULL }
if availableBytes return NULL
Definition: TPCircularBuffer.h:109
static BOOL SemaphoreIsHandled(HANDLE handle)
Definition: semaphore.c:39
static int SemaphoreGetFd(HANDLE handle)
Definition: semaphore.c:44
static DWORD SemaphoreCleanupHandle(HANDLE handle)
Definition: semaphore.c:54
static BOOL SemaphoreCloseHandle(HANDLE handle)
Definition: semaphore.c:75