This commit was generated by cvs2svn to compensate for changes in r52,
[reactos.git] / reactos / ntoskrnl / ke / sem.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/ke/sem.c
5 * PURPOSE: Implements kernel semaphores
6 * PROGRAMMER: David Welch (welch@mcmail.com)
7 * UPDATE HISTORY:
8 * Created 22/05/98
9 */
10
11 /* INCLUDES *****************************************************************/
12
13 #include <ddk/ntddk.h>
14 #include <internal/ke.h>
15
16 #include <internal/debug.h>
17
18 /* FUNCTIONS *****************************************************************/
19
20 VOID KeInitializeSemaphore(PKSEMAPHORE Semaphore,
21 LONG Count,
22 LONG Limit)
23 {
24 KeInitializeDispatcherHeader(&Semaphore->Header,SemaphoreType,
25 sizeof(KSEMAPHORE)/sizeof(ULONG),
26 Count);
27 Semaphore->Limit=Limit;
28 }
29
30 LONG KeReadStateSemaphore(PKSEMAPHORE Semaphore)
31 {
32 return(Semaphore->Header.SignalState);
33 }
34
35 LONG KeReleaseSemaphore(PKSEMAPHORE Semaphore,
36 KPRIORITY Increment,
37 LONG Adjustment,
38 BOOLEAN Wait)
39 {
40 UNIMPLEMENTED;
41 }
42