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
|
|
|
*/
|
|
|
|
|
2002-08-14 20:58:39 +00:00
|
|
|
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_KE_H
|
|
|
|
#define __NTOSKRNL_INCLUDE_INTERNAL_KE_H
|
1998-09-05 17:33:57 +00:00
|
|
|
|
2002-09-07 15:13:13 +00:00
|
|
|
/* INCLUDES *****************************************************************/
|
1998-09-05 17:33:57 +00:00
|
|
|
|
2002-09-08 10:23:54 +00:00
|
|
|
#ifndef __ASM__
|
|
|
|
#include <ddk/ntddk.h>
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#endif /* not __ASM__ */
|
|
|
|
|
2002-10-19 14:24:16 +00:00
|
|
|
#include "arch/ke.h"
|
2002-08-14 20:58:39 +00:00
|
|
|
|
1998-09-05 17:33:57 +00:00
|
|
|
/* INTERNAL KERNEL FUNCTIONS ************************************************/
|
|
|
|
|
2002-09-08 10:23:54 +00:00
|
|
|
#ifndef __ASM__
|
2001-04-10 17:48:17 +00:00
|
|
|
|
2000-07-04 08:52:47 +00:00
|
|
|
struct _KTHREAD;
|
|
|
|
|
2001-03-16 16:05:34 +00:00
|
|
|
VOID KiUpdateSystemTime (KIRQL oldIrql, ULONG Eip);
|
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);
|
2001-08-27 01:29:07 +00:00
|
|
|
VOID STDCALL KeExpireTimers(PKDPC Apc,
|
|
|
|
PVOID Arg1,
|
2002-08-14 20:58:39 +00:00
|
|
|
PVOID Arg2,
|
|
|
|
PVOID Arg3);
|
1998-09-05 17:33:57 +00:00
|
|
|
VOID KeInitializeDispatcherHeader(DISPATCHER_HEADER* Header, ULONG Type,
|
|
|
|
ULONG Size, ULONG SignalState);
|
2001-04-17 04:11:01 +00:00
|
|
|
VOID KeDumpStackFrames(PULONG Frame);
|
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);
|
2001-04-13 16:12:26 +00:00
|
|
|
VOID Phase1Initialization(PVOID Context);
|
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
|
2002-08-14 20:58:39 +00:00
|
|
|
KiAddProfileEvent(KPROFILE_SOURCE Source, ULONG Pc);
|
2001-03-18 19:35:14 +00:00
|
|
|
VOID
|
2001-09-24 00:51:17 +00:00
|
|
|
KiDispatchException(PEXCEPTION_RECORD ExceptionRecord,
|
2001-03-18 19:35:14 +00:00
|
|
|
PCONTEXT Context,
|
|
|
|
PKTRAP_FRAME Tf,
|
|
|
|
KPROCESSOR_MODE PreviousMode,
|
|
|
|
BOOLEAN SearchFrames);
|
|
|
|
VOID KeTrapFrameToContext(PKTRAP_FRAME TrapFrame,
|
|
|
|
PCONTEXT Context);
|
2001-04-16 23:29:55 +00:00
|
|
|
VOID
|
2003-02-14 17:52:31 +00:00
|
|
|
KeApplicationProcessorInit(VOID);
|
2001-04-16 23:29:55 +00:00
|
|
|
VOID
|
2001-04-17 04:11:01 +00:00
|
|
|
KePrepareForApplicationProcessorInit(ULONG id);
|
2001-11-20 02:29:45 +00:00
|
|
|
ULONG
|
|
|
|
KiUserTrapHandler(PKTRAP_FRAME Tf, ULONG ExceptionNr, PVOID Cr2);
|
2002-01-15 02:51:32 +00:00
|
|
|
VOID STDCALL
|
2002-06-18 21:51:11 +00:00
|
|
|
KePushAndStackSwitchAndSysRet(ULONG Push, PVOID NewStack);
|
2002-01-15 02:51:32 +00:00
|
|
|
VOID STDCALL
|
|
|
|
KeStackSwitchAndRet(PVOID NewStack);
|
2002-05-02 23:45:33 +00:00
|
|
|
VOID STDCALL
|
2003-02-14 17:52:31 +00:00
|
|
|
KeBugCheckWithTf(ULONG BugCheckCode,
|
2002-05-02 23:45:33 +00:00
|
|
|
ULONG BugCheckParameter1,
|
|
|
|
ULONG BugCheckParameter2,
|
|
|
|
ULONG BugCheckParameter3,
|
|
|
|
ULONG BugCheckParameter4,
|
|
|
|
PKTRAP_FRAME Tf);
|
|
|
|
VOID
|
|
|
|
KiDumpTrapFrame(PKTRAP_FRAME Tf, ULONG ExceptionNr, ULONG cr2);
|
2001-04-10 17:48:17 +00:00
|
|
|
|
2002-09-08 10:23:54 +00:00
|
|
|
#endif /* not __ASM__ */
|
|
|
|
|
|
|
|
#define MAXIMUM_PROCESSORS 32
|
2001-04-16 02:02:07 +00:00
|
|
|
|
2002-08-14 20:58:39 +00:00
|
|
|
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_KE_H */
|