FreeRDP
Loading...
Searching...
No Matches
TestSynchSemaphore.c
1
2#include <winpr/crt.h>
3#include <winpr/synch.h>
4
5int TestSynchSemaphore(int argc, char* argv[])
6{
7 HANDLE semaphore = NULL;
8 WINPR_UNUSED(argc);
9 WINPR_UNUSED(argv);
10 semaphore = CreateSemaphore(NULL, 0, 1, NULL);
11
12 if (!semaphore)
13 {
14 printf("CreateSemaphore failure\n");
15 return -1;
16 }
17
18 (void)CloseHandle(semaphore);
19
20 return 0;
21}