[Wine-patches] [eterhack] [0003/0021] ntoskrnl.exe: Add stub for KeInitializeSemaphore.

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Ср Янв 28 21:10:00 MSK 2009


---
 dlls/ntoskrnl.exe/ntoskrnl.c        |    9 +++++++++
 dlls/ntoskrnl.exe/ntoskrnl.exe.spec |    2 +-
 include/ddk/wdm.h                   |    6 ++++++
 3 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index aa05a96..78f7f23 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1832,6 +1832,15 @@ LONG WINAPI KeReleaseMutex( PRKMUTEX Mutex, BOOLEAN Wait )
 
 
 /***********************************************************************
+ *           KeInitializeSemaphore   (NTOSKRNL.EXE.@)
+ */
+void WINAPI KeInitializeSemaphore( PRKSEMAPHORE Semaphore, LONG Count, LONG Limit )
+{
+    FIXME("%p %d %d\n", Semaphore, Count, Limit);
+}
+
+
+/***********************************************************************
  *           KeInitializeSpinLock   (NTOSKRNL.EXE.@)
  */
 void WINAPI KeInitializeSpinLock( PKSPIN_LOCK SpinLock )
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 823574a..bdfcb47 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -551,7 +551,7 @@
 @ stub KeInitializeMutant
 @ stdcall KeInitializeMutex(ptr long)
 @ stub KeInitializeQueue
-@ stub KeInitializeSemaphore
+@ stdcall KeInitializeSemaphore(ptr long long)
 @ stdcall KeInitializeSpinLock(ptr)
 @ stdcall KeInitializeTimer(ptr)
 @ stdcall KeInitializeTimerEx(ptr long)
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index c072ba0..3b5c850 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -94,6 +94,11 @@ typedef struct _KMUTANT {
     UCHAR ApcDisable;
 } KMUTANT, *PKMUTANT, *RESTRICTED_POINTER PRKMUTANT, KMUTEX, *PKMUTEX, *RESTRICTED_POINTER PRKMUTEX;
 
+typedef struct _KSEMAPHORE {
+    DISPATCHER_HEADER Header;
+    LONG Limit;
+} KSEMAPHORE, *PKSEMAPHORE, *RESTRICTED_POINTER PRKSEMAPHORE;
+
 typedef enum _KWAIT_REASON
 {
     Executive,
@@ -1083,6 +1088,7 @@ void      WINAPI IoInvalidateDeviceRelations(PDEVICE_OBJECT,DEVICE_RELATION_TYPE
 
 NTSTATUS  WINAPI KeDelayExecutionThread(KPROCESSOR_MODE,BOOLEAN,PLARGE_INTEGER);
 PKTHREAD  WINAPI KeGetCurrentThread(void);
+void      WINAPI KeInitializeSemaphore(PRKSEMAPHORE,LONG,LONG);
 void      WINAPI KeQuerySystemTime(LARGE_INTEGER*);
 void      WINAPI KeQueryTickCount(LARGE_INTEGER*);
 ULONG     WINAPI KeQueryTimeIncrement(void);
-- 
1.6.0.2.GIT



Подробная информация о списке рассылки Wine-patches