ReactOS  0.4.12-dev-102-g4b7f1e0
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 KillAudioDeviceListLock ()
 
VOID LockAudioDeviceList ()
 
VOID UnlockAudioDeviceList ()
 

Variables

static HANDLE audio_device_list_lock = NULL
 

Function Documentation

◆ InitializeAudioDeviceListLock()

BOOL InitializeAudioDeviceListLock ( )

Definition at line 16 of file pnp_list_lock.c.

Referenced by CreateAudioDeviceList().

17 {
18  /* The security stuff is to make sure the mutex can be grabbed by
19  other processes - is this the best idea though ??? */
20 
21  SECURITY_DESCRIPTOR security_descriptor;
23 
25  SetSecurityDescriptorDacl(&security_descriptor, TRUE, 0, FALSE);
26 
27  security.nLength = sizeof(SECURITY_ATTRIBUTES);
28  security.lpSecurityDescriptor = &security_descriptor;
29  security.bInheritHandle = FALSE;
30 
32  FALSE,
34 
35  return ( audio_device_list_lock != NULL );
36 }
#define TRUE
Definition: types.h:120
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
Definition: security.c:804
#define SECURITY_DESCRIPTOR_REVISION
Definition: setypes.h:58
static HANDLE audio_device_list_lock
Definition: pnp_list_lock.c:13
smooth NULL
Definition: ftsmooth.c:416
#define AUDIO_LIST_LOCK_NAME
Definition: audiosrv.h:19
#define CreateMutex
Definition: winbase.h:3570
LPVOID lpSecurityDescriptor
Definition: compat.h:181
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
Definition: sec.c:262
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES

◆ KillAudioDeviceListLock()

VOID KillAudioDeviceListLock ( )

Definition at line 39 of file pnp_list_lock.c.

Referenced by CreateAudioDeviceList(), and DestroyAudioDeviceList().

40 {
43 }
#define CloseHandle
Definition: compat.h:398
static HANDLE audio_device_list_lock
Definition: pnp_list_lock.c:13
smooth NULL
Definition: ftsmooth.c:416

◆ LockAudioDeviceList()

VOID LockAudioDeviceList ( )

Definition at line 46 of file pnp_list_lock.c.

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

47 {
50 }
#define assert(x)
Definition: debug.h:53
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
static HANDLE audio_device_list_lock
Definition: pnp_list_lock.c:13
smooth NULL
Definition: ftsmooth.c:416
#define INFINITE
Definition: serial.h:102

◆ UnlockAudioDeviceList()

VOID UnlockAudioDeviceList ( )

Definition at line 53 of file pnp_list_lock.c.

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

54 {
57 }
#define assert(x)
Definition: debug.h:53
static HANDLE audio_device_list_lock
Definition: pnp_list_lock.c:13
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(IN HANDLE hMutex)
Definition: synch.c:564

Variable Documentation

◆ audio_device_list_lock

HANDLE audio_device_list_lock = NULL
static

Definition at line 13 of file pnp_list_lock.c.