1 /* Simple test of EngAcquireSemaphore only check if we got a lock or not */
3 Test_EngCreateSemaphore(PTESTINFO pti
)
7 PRTL_CRITICAL_SECTION lpcrit
;
9 hsem
= EngCreateSemaphore();
10 RTEST ( hsem
!= NULL
);
13 lpcrit
= (PRTL_CRITICAL_SECTION
) hsem
;
14 RTEST ( lpcrit
->DebugInfo
!= NULL
);
15 RTEST (lpcrit
->LockCount
== -1);
16 RTEST (lpcrit
->RecursionCount
== 0);
17 RTEST (lpcrit
->OwningThread
== 0);
18 RTEST (lpcrit
->LockSemaphore
== 0);
19 RTEST (lpcrit
->SpinCount
== 0);
21 EngDeleteSemaphore(hsem
);
23 return APISTATUS_NORMAL
;