FreeRDP/winpr/libwinpr/synch/test/TestSynchSemaphore.c
2019-11-07 10:53:54 +01:00

21 lines
283 B
C

#include <winpr/crt.h>
#include <winpr/synch.h>
int TestSynchSemaphore(int argc, char* argv[])
{
HANDLE semaphore;
semaphore = CreateSemaphore(NULL, 0, 1, NULL);
if (!semaphore)
{
printf("CreateSemaphore failure\n");
return -1;
}
CloseHandle(semaphore);
return 0;
}