1998-09-05 17:33:57 +00:00
|
|
|
/*
|
2000-12-28 03:38:08 +00:00
|
|
|
* ReactOS kernel
|
|
|
|
* Copyright (C) 2000 David Welch <welch@cwcom.net>
|
|
|
|
*
|
|
|
|
* 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.
|
1998-09-05 17:33:57 +00:00
|
|
|
*/
|
|
|
|
|
2000-12-28 03:38:08 +00:00
|
|
|
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_KERNEL_H
|
|
|
|
#define __NTOSKRNL_INCLUDE_INTERNAL_KERNEL_H
|
1998-09-05 17:33:57 +00:00
|
|
|
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
|
|
|
|
#include <ddk/ntddk.h>
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
/* INTERNAL KERNEL FUNCTIONS ************************************************/
|
|
|
|
|
2000-07-04 08:52:47 +00:00
|
|
|
struct _KTHREAD;
|
|
|
|
|
|
|
|
typedef struct _KTRAP_FRAME
|
|
|
|
{
|
|
|
|
PVOID DebugEbp;
|
|
|
|
PVOID DebugEip;
|
|
|
|
PVOID DebugArgMark;
|
2000-10-11 20:50:35 +00:00
|
|
|
PVOID DebugPointer;
|
2000-07-04 08:52:47 +00:00
|
|
|
PVOID TempCs;
|
|
|
|
PVOID TempEip;
|
|
|
|
PVOID Dr0;
|
|
|
|
PVOID Dr1;
|
|
|
|
PVOID Dr2;
|
|
|
|
PVOID Dr3;
|
|
|
|
PVOID Dr6;
|
|
|
|
PVOID Dr7;
|
|
|
|
USHORT Gs;
|
|
|
|
USHORT Reserved1;
|
|
|
|
USHORT Es;
|
|
|
|
USHORT Reserved2;
|
|
|
|
USHORT Ds;
|
|
|
|
USHORT Reserved3;
|
|
|
|
ULONG Edx;
|
|
|
|
ULONG Ecx;
|
|
|
|
ULONG Eax;
|
|
|
|
ULONG PreviousMode;
|
|
|
|
PVOID ExceptionList;
|
|
|
|
USHORT Fs;
|
|
|
|
USHORT Reserved4;
|
|
|
|
ULONG Edi;
|
|
|
|
ULONG Esi;
|
|
|
|
ULONG Ebx;
|
|
|
|
ULONG Ebp;
|
|
|
|
ULONG ErrorCode;
|
|
|
|
ULONG Eip;
|
|
|
|
ULONG Cs;
|
|
|
|
ULONG Eflags;
|
|
|
|
ULONG Esp;
|
|
|
|
USHORT Ss;
|
|
|
|
USHORT Reserved5;
|
|
|
|
USHORT V86_Es;
|
|
|
|
USHORT Reserved6;
|
|
|
|
USHORT V86_Ds;
|
|
|
|
USHORT Reserved7;
|
|
|
|
USHORT V86_Fs;
|
|
|
|
USHORT Reserved8;
|
|
|
|
USHORT V86_Gs;
|
|
|
|
USHORT Reserved9;
|
2000-10-07 13:41:58 +00:00
|
|
|
} KTRAP_FRAME, *PKTRAP_FRAME;
|
2000-07-04 08:52:47 +00:00
|
|
|
|
2001-03-14 23:19:14 +00:00
|
|
|
VOID KiUpdateSystemTime (KIRQL oldIrql);
|
2000-07-04 08:52:47 +00:00
|
|
|
|
1998-10-05 04:01:30 +00:00
|
|
|
VOID KeAcquireDispatcherDatabaseLock(BOOLEAN Wait);
|
|
|
|
VOID KeReleaseDispatcherDatabaseLock(BOOLEAN Wait);
|
1999-03-30 12:55:31 +00:00
|
|
|
BOOLEAN KeDispatcherObjectWake(DISPATCHER_HEADER* hdr);
|
1998-10-05 04:01:30 +00:00
|
|
|
|
2000-12-10 23:42:01 +00:00
|
|
|
#if 0
|
1998-09-05 17:33:57 +00:00
|
|
|
VOID KiInterruptDispatch(ULONG irq);
|
2000-12-10 23:42:01 +00:00
|
|
|
#endif
|
2001-02-18 19:43:15 +00:00
|
|
|
VOID KeExpireTimers( PKDPC Apc,
|
|
|
|
PVOID Arg1,
|
|
|
|
PVOID Arg2,
|
|
|
|
PVOID Arg3 );
|
2000-07-04 08:52:47 +00:00
|
|
|
NTSTATUS KeAddThreadTimeout(struct _KTHREAD* Thread,
|
|
|
|
PLARGE_INTEGER Interval);
|
1998-09-05 17:33:57 +00:00
|
|
|
VOID KeInitializeDispatcherHeader(DISPATCHER_HEADER* Header, ULONG Type,
|
|
|
|
ULONG Size, ULONG SignalState);
|
|
|
|
|
1999-12-13 22:04:41 +00:00
|
|
|
VOID KeDumpStackFrames(PVOID Stack, ULONG NrFrames);
|
1999-04-05 15:04:46 +00:00
|
|
|
ULONG KeAllocateGdtSelector(ULONG Desc[2]);
|
|
|
|
VOID KeFreeGdtSelector(ULONG Entry);
|
2000-10-07 13:41:58 +00:00
|
|
|
BOOLEAN KiTestAlert(VOID);
|
2000-07-04 08:52:47 +00:00
|
|
|
VOID KeRemoveAllWaitsThread(struct _ETHREAD* Thread, NTSTATUS WaitStatus);
|
|
|
|
PULONG KeGetStackTopThread(struct _ETHREAD* Thread);
|
2000-12-10 23:42:01 +00:00
|
|
|
VOID KeContextToTrapFrame(PCONTEXT Context,
|
|
|
|
PKTRAP_FRAME TrapFrame);
|
2001-01-19 15:09:01 +00:00
|
|
|
VOID KeReleaseDispatcherDatabaseLockAtDpcLevel(BOOLEAN Wait);
|
2001-02-06 00:11:20 +00:00
|
|
|
VOID
|
|
|
|
KiDeliverNormalApc(VOID);
|
2000-07-01 18:27:03 +00:00
|
|
|
|
2001-02-04 17:28:13 +00:00
|
|
|
BOOLEAN STDCALL KeRemoveQueueApc (PKAPC Apc);
|
|
|
|
|
1998-09-05 17:33:57 +00:00
|
|
|
/* INITIALIZATION FUNCTIONS *************************************************/
|
|
|
|
|
|
|
|
VOID KeInitExceptions(VOID);
|
2000-07-10 21:55:49 +00:00
|
|
|
VOID KeInitInterrupts(VOID);
|
1998-09-05 17:33:57 +00:00
|
|
|
VOID KeInitTimer(VOID);
|
|
|
|
VOID KeInitDpc(VOID);
|
|
|
|
VOID KeInitDispatcher(VOID);
|
1999-03-19 05:55:55 +00:00
|
|
|
VOID KeInitializeDispatcher(VOID);
|
|
|
|
VOID KeInitializeTimerImpl(VOID);
|
1999-03-25 00:37:06 +00:00
|
|
|
VOID KeInitializeBugCheck(VOID);
|
1998-09-05 17:33:57 +00:00
|
|
|
|
2000-07-10 21:55:49 +00:00
|
|
|
VOID KeInit1(VOID);
|
|
|
|
VOID KeInit2(VOID);
|
|
|
|
|
2000-10-07 13:41:58 +00:00
|
|
|
BOOLEAN KiDeliverUserApc(PKTRAP_FRAME TrapFrame);
|
2000-12-26 05:32:44 +00:00
|
|
|
VOID
|
|
|
|
NtEarlyInitVdm(VOID);
|
2000-10-07 13:41:58 +00:00
|
|
|
|
1998-09-05 17:33:57 +00:00
|
|
|
#endif
|