FreeRDP
event.c File Reference
#include <winpr/config.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <winpr/synch.h>
#include "synch.h"
#include <fcntl.h>
#include <errno.h>
#include "../handle/handle.h"
#include "../pipe/pipe.h"
#include "../log.h"
#include "event.h"

Macros

#define TAG   WINPR_TAG("synch.event")
 

Functions

static BOOL set_non_blocking_fd (int fd)
 
BOOL winpr_event_init (WINPR_EVENT_IMPL *event)
 
void winpr_event_init_from_fd (WINPR_EVENT_IMPL *event, int fd)
 
BOOL winpr_event_set (WINPR_EVENT_IMPL *event)
 
BOOL winpr_event_reset (WINPR_EVENT_IMPL *event)
 
void winpr_event_uninit (WINPR_EVENT_IMPL *event)
 
static BOOL EventCloseHandle (HANDLE handle)
 
static BOOL EventIsHandled (HANDLE handle)
 
static int EventGetFd (HANDLE handle)
 
static BOOL EventCloseHandle_ (WINPR_EVENT *event)
 
HANDLE CreateEventW (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCWSTR lpName)
 
HANDLE CreateEventA (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName)
 
HANDLE CreateEventExW (LPSECURITY_ATTRIBUTES lpEventAttributes, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess)
 
HANDLE CreateEventExA (LPSECURITY_ATTRIBUTES lpEventAttributes, LPCSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess)
 
HANDLE OpenEventW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
 
HANDLE OpenEventA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
 
BOOL SetEvent (HANDLE hEvent)
 
BOOL ResetEvent (HANDLE hEvent)
 
HANDLE CreateFileDescriptorEventW (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, int FileDescriptor, ULONG mode)
 
HANDLE CreateFileDescriptorEventA (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, int FileDescriptor, ULONG mode)
 
HANDLE CreateWaitObjectEvent (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, void *pObject)
 
int GetEventFileDescriptor (HANDLE hEvent)
 
int SetEventFileDescriptor (HANDLE hEvent, int FileDescriptor, ULONG mode)
 
void * GetEventWaitObject (HANDLE hEvent)
 

Variables

static HANDLE_OPS ops
 

Macro Definition Documentation

◆ TAG

#define TAG   WINPR_TAG("synch.event")

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 2017 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2017 Thincast Technologies GmbH

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

◆ CreateEventA()

HANDLE CreateEventA ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
LPCSTR  lpName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateEventExA()

HANDLE CreateEventExA ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
LPCSTR  lpName,
DWORD  dwFlags,
DWORD  dwDesiredAccess 
)
Here is the call graph for this function:

◆ CreateEventExW()

HANDLE CreateEventExW ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
LPCWSTR  lpName,
DWORD  dwFlags,
DWORD  dwDesiredAccess 
)
Here is the call graph for this function:

◆ CreateEventW()

HANDLE CreateEventW ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
LPCWSTR  lpName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateFileDescriptorEventA()

HANDLE CreateFileDescriptorEventA ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
int  FileDescriptor,
ULONG  mode 
)
Here is the call graph for this function:

◆ CreateFileDescriptorEventW()

HANDLE CreateFileDescriptorEventW ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
int  FileDescriptor,
ULONG  mode 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateWaitObjectEvent()

HANDLE CreateWaitObjectEvent ( LPSECURITY_ATTRIBUTES  lpEventAttributes,
BOOL  bManualReset,
BOOL  bInitialState,
void *  pObject 
)

Returns an event based on the handle returned by GetEventWaitObject()

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EventCloseHandle()

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

◆ EventCloseHandle_()

static BOOL EventCloseHandle_ ( WINPR_EVENT *  event)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EventGetFd()

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

◆ EventIsHandled()

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

◆ GetEventFileDescriptor()

int GetEventFileDescriptor ( HANDLE  hEvent)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEventWaitObject()

void* GetEventWaitObject ( HANDLE  hEvent)

Returns platform-specific wait object as a void pointer

On Windows, the returned object is the same as the hEvent argument and is an event HANDLE usable in WaitForMultipleObjects

On other platforms, the returned object can be cast to an int to obtain a file descriptor usable in select()

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OpenEventA()

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

◆ OpenEventW()

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

◆ ResetEvent()

BOOL ResetEvent ( HANDLE  hEvent)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_non_blocking_fd()

static BOOL set_non_blocking_fd ( int  fd)
static
Here is the caller graph for this function:

◆ SetEvent()

BOOL SetEvent ( HANDLE  hEvent)
Here is the call graph for this function:

◆ SetEventFileDescriptor()

int SetEventFileDescriptor ( HANDLE  hEvent,
int  FileDescriptor,
ULONG  mode 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_event_init()

BOOL winpr_event_init ( WINPR_EVENT_IMPL *  event)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_event_init_from_fd()

void winpr_event_init_from_fd ( WINPR_EVENT_IMPL *  event,
int  fd 
)
Here is the caller graph for this function:

◆ winpr_event_reset()

BOOL winpr_event_reset ( WINPR_EVENT_IMPL *  event)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_event_set()

BOOL winpr_event_set ( WINPR_EVENT_IMPL *  event)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_event_uninit()

void winpr_event_uninit ( WINPR_EVENT_IMPL *  event)
Here is the caller graph for this function:

Variable Documentation

◆ ops

HANDLE_OPS ops
static
Initial value:
NULL,
NULL }
if availableBytes return NULL
Definition: TPCircularBuffer.h:109
static BOOL EventCloseHandle(HANDLE handle)
Definition: event.c:237
static int EventGetFd(HANDLE handle)
Definition: event.c:196
static BOOL EventIsHandled(HANDLE handle)
Definition: event.c:191