ReactOS 0.4.16-dev-91-g764881a
pnp_list_lock.c File Reference
#include "audiosrv.h"
#include <assert.h>
Include dependency graph for pnp_list_lock.c:

Go to the source code of this file.

Functions

BOOL InitializeAudioDeviceListLock (VOID)
 
VOID KillAudioDeviceListLock (VOID)
 
VOID LockAudioDeviceList (VOID)
 
VOID UnlockAudioDeviceList (VOID)
 

Variables

static HANDLE audio_device_list_lock = NULL
 

Function Documentation

◆ InitializeAudioDeviceListLock()

BOOL InitializeAudioDeviceListLock ( VOID  )

Definition at line 15 of file pnp_list_lock.c.

16{
17 /* The security stuff is to make sure the mutex can be grabbed by
18 other processes - is this the best idea though ??? */
19
20 SECURITY_DESCRIPTOR security_descriptor;
22
24 SetSecurityDescriptorDacl(&security_descriptor, TRUE, 0, FALSE);
25
26 security.nLength = sizeof(SECURITY_ATTRIBUTES);
27 security.lpSecurityDescriptor = &security_descriptor;
28 security.bInheritHandle = FALSE;
29
31 FALSE,
33
34 return (audio_device_list_lock != NULL);
35}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
Definition: security.c:929
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
static HANDLE audio_device_list_lock
Definition: pnp_list_lock.c:12
#define AUDIO_LIST_LOCK_NAME
Definition: audiosrv.h:19
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
Definition: sec.c:262
#define CreateMutex
Definition: winbase.h:3756
#define SECURITY_DESCRIPTOR_REVISION
Definition: setypes.h:58

Referenced by CreateAudioDeviceList().

◆ KillAudioDeviceListLock()

VOID KillAudioDeviceListLock ( VOID  )

Definition at line 38 of file pnp_list_lock.c.

39{
42}
#define CloseHandle
Definition: compat.h:739

Referenced by CreateAudioDeviceList(), and DestroyAudioDeviceList().

◆ LockAudioDeviceList()

VOID LockAudioDeviceList ( VOID  )

Definition at line 45 of file pnp_list_lock.c.

46{
49}
#define assert(x)
Definition: debug.h:53
#define INFINITE
Definition: serial.h:102
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82

Referenced by AppendAudioDeviceToList(), CreateAudioDeviceList(), and DestroyAudioDeviceList().

◆ UnlockAudioDeviceList()

VOID UnlockAudioDeviceList ( VOID  )

Definition at line 52 of file pnp_list_lock.c.

53{
56}
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(IN HANDLE hMutex)
Definition: synch.c:618

Referenced by AppendAudioDeviceToList(), CreateAudioDeviceList(), and DestroyAudioDeviceList().

Variable Documentation

◆ audio_device_list_lock

HANDLE audio_device_list_lock = NULL
static