winpr/event: remove critical section
The critical section isn't required and not used anymore since commit 8a2220a3d9c5ad70b425a33772f14f3dbe956841.
This commit is contained in:
parent
a637cdd9f7
commit
4250f3f030
@ -47,8 +47,6 @@
|
|||||||
#include "../log.h"
|
#include "../log.h"
|
||||||
#define TAG WINPR_TAG("synch.event")
|
#define TAG WINPR_TAG("synch.event")
|
||||||
|
|
||||||
CRITICAL_SECTION cs = { NULL, 0, 0, NULL, NULL, 0 };
|
|
||||||
|
|
||||||
static BOOL EventCloseHandle(HANDLE handle);
|
static BOOL EventCloseHandle(HANDLE handle);
|
||||||
|
|
||||||
static BOOL EventIsHandled(HANDLE handle)
|
static BOOL EventIsHandled(HANDLE handle)
|
||||||
@ -144,16 +142,6 @@ HANDLE CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset,
|
|||||||
if (bInitialState)
|
if (bInitialState)
|
||||||
SetEvent(event);
|
SetEvent(event);
|
||||||
|
|
||||||
if (!cs.LockSemaphore && !InitializeCriticalSectionEx(&cs, 0, 0))
|
|
||||||
{
|
|
||||||
if (event->pipe_fd[0] != -1)
|
|
||||||
close(event->pipe_fd[0]);
|
|
||||||
if (event->pipe_fd[1] != -1)
|
|
||||||
close(event->pipe_fd[1]);
|
|
||||||
free(event);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (HANDLE)event;
|
return (HANDLE)event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user