Added win32k support functions.
svn path=/trunk/; revision=2483
VOID STDCALL KeInitializeMutex (PKMUTEX Mutex,
ULONG Level);
+VOID STDCALL
+KeInitializeQueue(IN PKQUEUE Queue,
+ IN ULONG Count);
+
VOID STDCALL KeInitializeSemaphore (PKSEMAPHORE Semaphore,
LONG Count,
LONG Limit);
BOOLEAN STDCALL KeInsertDeviceQueue (PKDEVICE_QUEUE DeviceQueue,
PKDEVICE_QUEUE_ENTRY DeviceQueueEntry);
+LONG STDCALL
+KeInsertHeadQueue(IN PKQUEUE Queue,
+ IN PLIST_ENTRY Entry);
+
+LONG STDCALL
+KeInsertQueue(IN PKQUEUE Queue,
+ IN PLIST_ENTRY Entry);
+
VOID STDCALL KeInsertQueueApc (PKAPC Apc,
PVOID SystemArgument1,
PVOID SystemArgument2,
LONG STDCALL
KeReadStateMutant(IN PKMUTANT Mutant);
-LONG
-STDCALL
-KeReadStateMutex (
- PKMUTEX Mutex
- );
+LONG STDCALL
+KeReadStateMutex(IN PKMUTEX Mutex);
-LONG
-STDCALL
-KeReadStateSemaphore (
- PKSEMAPHORE Semaphore
- );
+LONG STDCALL
+KeReadStateQueue(IN PKQUEUE Queue);
-BOOLEAN
-STDCALL
-KeReadStateTimer (
- PKTIMER Timer
- );
+LONG STDCALL
+KeReadStateSemaphore(IN PKSEMAPHORE Semaphore);
+
+BOOLEAN STDCALL
+KeReadStateTimer(IN PKTIMER Timer);
BOOLEAN
STDCALL
PKDEVICE_QUEUE DeviceQueue
);
-BOOLEAN
-STDCALL
-KeRemoveEntryDeviceQueue (
- PKDEVICE_QUEUE DeviceQueue,
- PKDEVICE_QUEUE_ENTRY DeviceQueueEntry
- );
+BOOLEAN STDCALL
+KeRemoveEntryDeviceQueue(PKDEVICE_QUEUE DeviceQueue,
+ PKDEVICE_QUEUE_ENTRY DeviceQueueEntry);
-BOOLEAN
-STDCALL
-KeRemoveQueueDpc (
- PKDPC Dpc
- );
+PLIST_ENTRY STDCALL
+KeRemoveQueue(IN PKQUEUE Queue,
+ IN KPROCESSOR_MODE WaitMode,
+ IN PLARGE_INTEGER Timeout OPTIONAL);
-LONG
-STDCALL
-KeResetEvent (
- PKEVENT Event
- );
+BOOLEAN STDCALL
+KeRemoveQueueDpc(IN PKDPC Dpc);
-LONG STDCALL KeSetBasePriorityThread (struct _KTHREAD* Thread,
- LONG Increment);
+LONG STDCALL
+KeResetEvent(IN PKEVENT Event);
+
+LONG STDCALL
+KeSetBasePriorityThread(struct _KTHREAD* Thread,
+ LONG Increment);
LONG
STDCALL
-# $Id: Makefile,v 1.62 2002/01/03 14:51:25 ekohl Exp $
+# $Id: Makefile,v 1.63 2002/01/04 13:09:36 ekohl Exp $
#
# ReactOS Operating System
#
ke/spinlock.o \
ke/timer.o \
ke/wait.o \
- ke/kthread.o
+ ke/kthread.o \
+ ke/queue.o
# Memory Manager (Mm)
OBJECTS_MM = \
ps/thread.o \
ps/tinfo.o \
ps/debug.o \
- ps/suspend.o
+ ps/suspend.o \
+ ps/win32.o
# Executive Subsystem (Ex)
OBJECTS_EX = \
#define InternalMutexType (InternalBaseType + 9)
#define InternalNotificationTimer (InternalBaseType + 10)
#define InternalSynchronizationTimer (InternalBaseType + 11)
+#define InternalQueueType (InternalBaseType + 12)
KeReleaseSpinLock(&DeviceQueue->Lock,oldlvl);
return(TRUE);
}
+
+
+BOOLEAN STDCALL
+KeRemoveEntryDeviceQueue(PKDEVICE_QUEUE DeviceQueue,
+ PKDEVICE_QUEUE_ENTRY DeviceQueueEntry)
+{
+ UNIMPLEMENTED;
+ return(FALSE);
+}
--- /dev/null
+/*
+ * ReactOS kernel
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* $Id: queue.c,v 1.1 2002/01/04 13:08:39 ekohl Exp $
+ *
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/ke/queue.c
+ * PURPOSE: Implements kernel queues
+ * PROGRAMMER: Eric Kohl (ekohl@rz-online.de)
+ * UPDATE HISTORY:
+ * Created 04/01/2002
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ddk/ntddk.h>
+#include <internal/ke.h>
+#include <internal/id.h>
+
+#define NDEBUG
+#include <internal/debug.h>
+
+/* FUNCTIONS *****************************************************************/
+
+VOID STDCALL
+KeInitializeQueue(IN PKQUEUE Queue,
+ IN ULONG Count OPTIONAL)
+{
+ KeInitializeDispatcherHeader(&Queue->Header,
+ InternalQueueType,
+ sizeof(KQUEUE)/sizeof(ULONG),
+ 0);
+ InitializeListHead(&Queue->EntryListHead);
+ InitializeListHead(&Queue->ThreadListEntry);
+ Queue->CurrentCount = 0;
+ Queue->MaximumCount = (Count == 0) ? KeNumberProcessors : Count;
+}
+
+
+LONG STDCALL
+KeReadStateQueue(IN PKQUEUE Queue)
+{
+ return(Queue->Header.SignalState);
+}
+
+
+LONG STDCALL
+KeInsertHeadQueue(IN PKQUEUE Queue,
+ IN PLIST_ENTRY Entry)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+
+LONG STDCALL
+KeInsertQueue(IN PKQUEUE Queue,
+ IN PLIST_ENTRY Entry)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+
+PLIST_ENTRY STDCALL
+KeRemoveQueue(IN PKQUEUE Queue,
+ IN KPROCESSOR_MODE WaitMode,
+ IN PLARGE_INTEGER Timeout OPTIONAL)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+
+PLIST_ENTRY STDCALL
+KeRundownQueue(IN PKQUEUE Queue)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+/* EOF */
-; $Id: ntoskrnl.def,v 1.122 2002/01/03 18:02:34 ekohl Exp $
+; $Id: ntoskrnl.def,v 1.123 2002/01/04 13:09:37 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
KeInitializeInterrupt@44
KeInitializeMutant@8
KeInitializeMutex@8
-;KeInitializeQueue
+KeInitializeQueue@8
KeInitializeSemaphore@12
KeInitializeSpinLock@4
KeInitializeTimer@4
KeInitializeTimerEx@8
KeInsertByKeyDeviceQueue@12
KeInsertDeviceQueue@8
-;KeInsertHeadQueue
-;KeInsertQueue
+KeInsertHeadQueue@8
+KeInsertQueue@8
KeInsertQueueApc@16
KeInsertQueueDpc@12
;KeIsExecutingDpc
KeReadStateEvent@4
KeReadStateMutant@4
KeReadStateMutex@4
-;KeReadStateQueue
+KeReadStateQueue@4
KeReadStateSemaphore@4
KeReadStateTimer@4
KeRegisterBugCheckCallback@20
KeReleaseSpinLockFromDpcLevel@4
KeRemoveByKeyDeviceQueue@8
KeRemoveDeviceQueue@4
-;KeRemoveEntryDeviceQueue
-;KeRemoveQueue
+KeRemoveEntryDeviceQueue@8
+KeRemoveQueue@12
KeRemoveQueueDpc@4
KeResetEvent@4
;KeRestoreFloatingPointState
-;KeRundownQueue
+KeRundownQueue@4
;KeSaveFloatingPointState
KeServiceDescriptorTable DATA
;KeSetAffinityThread
;PsChargePoolQuota@12
PsCreateSystemProcess@12
PsCreateSystemThread@28
-;PsCreateWin32Process@4
+PsCreateWin32Process@4
PsDispatchThread@4
-;PsEstablishWin32Callouts@24
+PsEstablishWin32Callouts@24
PsGetCurrentProcessId@0
PsGetCurrentThreadId@0
PsGetCurrentThread@0
-; $Id: ntoskrnl.edf,v 1.108 2002/01/03 18:02:34 ekohl Exp $
+; $Id: ntoskrnl.edf,v 1.109 2002/01/04 13:09:37 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
KeInitializeInterrupt=KeInitializeInterrupt@44
KeInitializeMutant=KeInitializeMutant@8
KeInitializeMutex=KeInitializeMutex@8
-;KeInitializeQueue
+KeInitializeQueue=KeInitializeQueue@8
KeInitializeSemaphore=KeInitializeSemaphore@12
KeInitializeSpinLock=KeInitializeSpinLock@4
KeInitializeTimer=KeInitializeTimer@4
KeInitializeTimerEx=KeInitializeTimerEx@8
KeInsertByKeyDeviceQueue=KeInsertByKeyDeviceQueue@12
KeInsertDeviceQueue=KeInsertDeviceQueue@8
-;KeInsertHeadQueue
-;KeInsertQueue
+KeInsertHeadQueue=KeInsertHeadQueue@8
+KeInsertQueue=KeInsertQueue@8
KeInsertQueueApc=KeInsertQueueApc@16
KeInsertQueueDpc=KeInsertQueueDpc@12
;KeIsExecutingDpc
KeReadStateEvent=KeReadStateEvent@4
KeReadStateMutant=KeReadStateMutant@4
KeReadStateMutex=KeReadStateMutex@4
-;KeReadStateQueue
+KeReadStateQueue=KeReadStateQueue@4
KeReadStateSemaphore=KeReadStateSemaphore@4
KeReadStateTimer=KeReadStateTimer@4
KeRegisterBugCheckCallback=KeRegisterBugCheckCallback@20
KeReleaseSpinLockFromDpcLevel=KeReleaseSpinLockFromDpcLevel@4
KeRemoveByKeyDeviceQueue=KeRemoveByKeyDeviceQueue@8
KeRemoveDeviceQueue=KeRemoveDeviceQueue@4
-;KeRemoveEntryDeviceQueue
-;KeRemoveQueue
+KeRemoveEntryDeviceQueue=KeRemoveEntryDeviceQueue@8
+KeRemoveQueue=KeRemoveQueue@12
KeRemoveQueueDpc=KeRemoveQueueDpc@4
KeResetEvent=KeResetEvent@4
;KeRestoreFloatingPointState
-;KeRundownQueue
+KeRundownQueue=KeRundownQueue@4
;KeSaveFloatingPointState
KeServiceDescriptorTable DATA
;KeSetAffinityThread
;PsChargePoolQuota=PsChargePoolQuota@12
PsCreateSystemProcess=PsCreateSystemProcess@12
PsCreateSystemThread=PsCreateSystemThread@28
-;PsCreateWin32Process=PsCreateWin32Process@4
+PsCreateWin32Process=PsCreateWin32Process@4
PsDispatchThread=PsDispatchThread@4
-;PsEstablishWin32Callouts=PsEstablishWin32Callouts@24
+PsEstablishWin32Callouts=PsEstablishWin32Callouts@24
PsGetCurrentProcessId=PsGetCurrentProcessId@0
PsGetCurrentThreadId=PsGetCurrentThreadId@0
PsGetCurrentThread=PsGetCurrentThread@0
--- /dev/null
+/*
+ * ReactOS kernel
+ * Copyright (C) 2002 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* $Id: win32.c,v 1.1 2002/01/04 13:09:11 ekohl Exp $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/ps/win32.c
+ * PURPOSE: win32k support
+ * PROGRAMMER: Eric Kohl (ekohl@rz-online.de)
+ * REVISION HISTORY:
+ * 04/01/2002: Created
+ */
+
+/* INCLUDES ****************************************************************/
+
+#include <ddk/ntddk.h>
+#include <internal/ps.h>
+
+/* TYPES *******************************************************************/
+
+/* GLOBALS ******************************************************************/
+
+static ULONG PspWin32ProcessSize = 0;
+
+
+/* FUNCTIONS ***************************************************************/
+
+NTSTATUS STDCALL
+PsCreateWin32Process(PEPROCESS Process)
+{
+ if (Process->Win32Process != NULL)
+ return(STATUS_SUCCESS);
+
+ Process->Win32Process = ExAllocatePool(NonPagedPool,
+ PspWin32ProcessSize);
+ if (Process->Win32Process == NULL)
+ return(STATUS_NO_MEMORY);
+
+ RtlZeroMemory(Process->Win32Process,
+ PspWin32ProcessSize);
+
+ return(STATUS_SUCCESS);
+}
+
+
+VOID STDCALL
+PsEstablishWin32Callouts(PVOID Param1,
+ PVOID Param2,
+ PVOID Param3,
+ PVOID Param4,
+ PVOID Param5,
+ ULONG W32ProcessSize)
+{
+ PspWin32ProcessSize = W32ProcessSize;
+}
+
+/* EOF */