freerdp/winpr/libwinpr/synch/test/TestSynchSemaphore.c

21 lines
283 B
C
Raw Normal View History

2023-05-09 21:29:50 +00:00
#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;
}