mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 04:45:43 +00:00
More NDK Fixes
svn path=/trunk/; revision=16075
This commit is contained in:
parent
a6c04adbb2
commit
9d04f9a976
7 changed files with 263 additions and 25 deletions
|
@ -14,6 +14,8 @@
|
|||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
extern POBJECT_TYPE NTOSAPI ExIoCompletionType;
|
||||
extern NTOSAPI POBJECT_TYPE ExMutantObjectType;
|
||||
extern NTOSAPI POBJECT_TYPE ExTimerType;
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
|
||||
|
@ -45,5 +47,59 @@ typedef enum _HARDERROR_RESPONSE
|
|||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
typedef struct _EX_QUEUE_WORKER_INFO
|
||||
{
|
||||
UCHAR QueueDisabled:1;
|
||||
UCHAR MakeThreadsAsNecessary:1;
|
||||
UCHAR WaitMode:1;
|
||||
ULONG WorkerCount:29;
|
||||
} EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;
|
||||
|
||||
typedef struct _EX_WORK_QUEUE
|
||||
{
|
||||
KQUEUE WorkerQueue;
|
||||
ULONG DynamicThreadCount;
|
||||
ULONG WorkItemsProcessed;
|
||||
ULONG WorkItemsProcessedLastPass;
|
||||
ULONG QueueDepthLastPass;
|
||||
EX_QUEUE_WORKER_INFO Info;
|
||||
} EX_WORK_QUEUE, *PEX_WORK_QUEUE;
|
||||
|
||||
typedef struct _HANDLE_TABLE_ENTRY_INFO
|
||||
{
|
||||
ULONG AuditMask;
|
||||
} HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
|
||||
|
||||
typedef struct _HANDLE_TABLE_ENTRY
|
||||
{
|
||||
union
|
||||
{
|
||||
PVOID Object;
|
||||
ULONG_PTR ObAttributes;
|
||||
PHANDLE_TABLE_ENTRY_INFO InfoTable;
|
||||
ULONG_PTR Value;
|
||||
} u1;
|
||||
union
|
||||
{
|
||||
ULONG GrantedAccess;
|
||||
USHORT GrantedAccessIndex;
|
||||
LONG NextFreeTableEntry;
|
||||
} u2;
|
||||
} HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
|
||||
|
||||
typedef struct _HANDLE_TABLE
|
||||
{
|
||||
ULONG Flags;
|
||||
LONG HandleCount;
|
||||
PHANDLE_TABLE_ENTRY **Table;
|
||||
PEPROCESS QuotaProcess;
|
||||
HANDLE UniqueProcessId;
|
||||
LONG FirstFreeTableEntry;
|
||||
LONG NextIndexNeedingPool;
|
||||
ERESOURCE HandleTableLock;
|
||||
LIST_ENTRY HandleTableList;
|
||||
KEVENT HandleContentionEvent;
|
||||
} HANDLE_TABLE;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#define _HALTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
#include <ddk/ntdddisk.h>
|
||||
//#include <ddk/ntdddisk.h>
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
extern ULONG NTOSAPI KdComPortInUse;
|
||||
|
@ -48,7 +48,7 @@ typedef struct _LOADER_MODULE
|
|||
ULONG Reserved;
|
||||
} LOADER_MODULE, *PLOADER_MODULE;
|
||||
|
||||
typedef struct _LOADER_PARAMETER_BLOCK
|
||||
typedef struct _LOADER_PARAMETER_BLOCK
|
||||
{
|
||||
ULONG Flags;
|
||||
ULONG MemLower;
|
||||
|
@ -64,6 +64,9 @@ typedef struct _LOADER_PARAMETER_BLOCK
|
|||
ULONG DrivesAddr;
|
||||
ULONG ConfigTable;
|
||||
ULONG BootLoaderName;
|
||||
ULONG PageDirectoryStart;
|
||||
ULONG PageDirectoryEnd;
|
||||
ULONG KernelBase;
|
||||
} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -123,23 +123,23 @@ KeSetEventBoostPriority(
|
|||
IN PKTHREAD *Thread OPTIONAL
|
||||
);
|
||||
|
||||
PVOID
|
||||
STDCALL
|
||||
KeFindConfigurationEntry(
|
||||
IN PVOID Unknown,
|
||||
IN ULONG Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG RegKey
|
||||
);
|
||||
|
||||
PVOID
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
STDCALL
|
||||
KeFindConfigurationNextEntry(
|
||||
IN PVOID Unknown,
|
||||
IN ULONG Class,
|
||||
IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG RegKey,
|
||||
IN PVOID *NextLink
|
||||
IN PULONG ComponentKey OPTIONAL,
|
||||
IN PCONFIGURATION_COMPONENT_DATA *NextLink
|
||||
);
|
||||
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
STDCALL
|
||||
KeFindConfigurationEntry(
|
||||
IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG ComponentKey OPTIONAL
|
||||
);
|
||||
|
||||
VOID
|
||||
|
|
|
@ -11,11 +11,22 @@
|
|||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
#include "haltypes.h"
|
||||
#include <arc/arc.h>
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
#define SSDT_MAX_ENTRIES 4
|
||||
#define PROCESSOR_FEATURE_MAX 64
|
||||
|
||||
#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
|
||||
|
||||
#define THREAD_WAIT_OBJECTS 4
|
||||
|
||||
/* FIXME: Create an ASM Offset File */
|
||||
#define KTSS_ESP0 (0x4)
|
||||
#define KTSS_CR3 (0x1C)
|
||||
#define KTSS_EFLAGS (0x24)
|
||||
#define KTSS_IOMAPBASE (0x66)
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
extern CHAR NTOSAPI KeNumberProcessors;
|
||||
extern LOADER_PARAMETER_BLOCK NTOSAPI KeLoaderBlock;
|
||||
|
@ -32,6 +43,15 @@ extern SSDT_ENTRY NTOSAPI KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES];
|
|||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
typedef struct _CONFIGURATION_COMPONENT_DATA
|
||||
{
|
||||
struct _CONFIGURATION_COMPONENT_DATA *Parent;
|
||||
struct _CONFIGURATION_COMPONENT_DATA *Child;
|
||||
struct _CONFIGURATION_COMPONENT_DATA *Sibling;
|
||||
CONFIGURATION_COMPONENT Component;
|
||||
} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA;
|
||||
|
||||
|
||||
typedef enum _KAPC_ENVIRONMENT
|
||||
{
|
||||
OriginalApcEnvironment,
|
||||
|
@ -120,6 +140,99 @@ typedef struct _LDT_ENTRY {
|
|||
} HighWord;
|
||||
} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
|
||||
|
||||
|
||||
#include <pshpack1.h>
|
||||
|
||||
typedef struct _KTSSNOIOPM
|
||||
{
|
||||
USHORT PreviousTask;
|
||||
USHORT Reserved1;
|
||||
ULONG Esp0;
|
||||
USHORT Ss0;
|
||||
USHORT Reserved2;
|
||||
ULONG Esp1;
|
||||
USHORT Ss1;
|
||||
USHORT Reserved3;
|
||||
ULONG Esp2;
|
||||
USHORT Ss2;
|
||||
USHORT Reserved4;
|
||||
ULONG Cr3;
|
||||
ULONG Eip;
|
||||
ULONG Eflags;
|
||||
ULONG Eax;
|
||||
ULONG Ecx;
|
||||
ULONG Edx;
|
||||
ULONG Ebx;
|
||||
ULONG Esp;
|
||||
ULONG Ebp;
|
||||
ULONG Esi;
|
||||
ULONG Edi;
|
||||
USHORT Es;
|
||||
USHORT Reserved5;
|
||||
USHORT Cs;
|
||||
USHORT Reserved6;
|
||||
USHORT Ss;
|
||||
USHORT Reserved7;
|
||||
USHORT Ds;
|
||||
USHORT Reserved8;
|
||||
USHORT Fs;
|
||||
USHORT Reserved9;
|
||||
USHORT Gs;
|
||||
USHORT Reserved10;
|
||||
USHORT Ldt;
|
||||
USHORT Reserved11;
|
||||
USHORT Trap;
|
||||
USHORT IoMapBase;
|
||||
/* no interrupt redirection map */
|
||||
UCHAR IoBitmap[1];
|
||||
} KTSSNOIOPM;
|
||||
|
||||
typedef struct _KTSS
|
||||
{
|
||||
USHORT PreviousTask;
|
||||
USHORT Reserved1;
|
||||
ULONG Esp0;
|
||||
USHORT Ss0;
|
||||
USHORT Reserved2;
|
||||
ULONG Esp1;
|
||||
USHORT Ss1;
|
||||
USHORT Reserved3;
|
||||
ULONG Esp2;
|
||||
USHORT Ss2;
|
||||
USHORT Reserved4;
|
||||
ULONG Cr3;
|
||||
ULONG Eip;
|
||||
ULONG Eflags;
|
||||
ULONG Eax;
|
||||
ULONG Ecx;
|
||||
ULONG Edx;
|
||||
ULONG Ebx;
|
||||
ULONG Esp;
|
||||
ULONG Ebp;
|
||||
ULONG Esi;
|
||||
ULONG Edi;
|
||||
USHORT Es;
|
||||
USHORT Reserved5;
|
||||
USHORT Cs;
|
||||
USHORT Reserved6;
|
||||
USHORT Ss;
|
||||
USHORT Reserved7;
|
||||
USHORT Ds;
|
||||
USHORT Reserved8;
|
||||
USHORT Fs;
|
||||
USHORT Reserved9;
|
||||
USHORT Gs;
|
||||
USHORT Reserved10;
|
||||
USHORT Ldt;
|
||||
USHORT Reserved11;
|
||||
USHORT Trap;
|
||||
USHORT IoMapBase;
|
||||
/* no interrupt redirection map */
|
||||
UCHAR IoBitmap[8193];
|
||||
} KTSS;
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
/* i386 Doesn't have Exception Frames */
|
||||
typedef struct _KEXCEPTION_FRAME {
|
||||
|
||||
|
@ -157,6 +270,43 @@ typedef struct _KEVENT_PAIR
|
|||
KEVENT HighEvent;
|
||||
} KEVENT_PAIR, *PKEVENT_PAIR;
|
||||
|
||||
/* FIXME: Add KOBJECTS Here */
|
||||
typedef enum _KOBJECTS {
|
||||
EventNotificationObject = 0,
|
||||
EventSynchronizationObject = 1,
|
||||
MutantObject = 2,
|
||||
ProcessObject = 3,
|
||||
QueueObject = 4,
|
||||
SemaphoreObject = 5,
|
||||
ThreadObject = 6,
|
||||
GateObject = 7,
|
||||
TimerNotificationObject = 8,
|
||||
TimerSynchronizationObject = 9,
|
||||
Spare2Object = 10,
|
||||
Spare3Object = 11,
|
||||
Spare4Object = 12,
|
||||
Spare5Object = 13,
|
||||
Spare6Object = 14,
|
||||
Spare7Object = 15,
|
||||
Spare8Object = 16,
|
||||
Spare9Object = 17,
|
||||
ApcObject = 18,
|
||||
DpcObject = 19,
|
||||
DeviceQueueObject = 20,
|
||||
EventPairObject = 21,
|
||||
InterruptObject = 22,
|
||||
ProfileObject = 23,
|
||||
ThreadedDpcObject = 24,
|
||||
MaximumKernelObject = 25
|
||||
} KOBJECTS;
|
||||
|
||||
typedef enum _KTHREAD_STATE {
|
||||
Initialized,
|
||||
Ready,
|
||||
Running,
|
||||
Standby,
|
||||
Terminated,
|
||||
Waiting,
|
||||
Transition,
|
||||
DeferredReady,
|
||||
} KTHREAD_STATE, *PKTHREAD_STATE;
|
||||
#endif
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
#define PEB_BASE (0x7FFDF000)
|
||||
|
||||
#define EXCEPTION_CONTINUE_SEARCH 0
|
||||
#define EXCEPTION_EXECUTE_HANDLER 1
|
||||
|
||||
#define EXCEPTION_UNWINDING 0x02
|
||||
#define EXCEPTION_EXIT_UNWIND 0x04
|
||||
#define EXCEPTION_STACK_INVALID 0x8
|
||||
|
@ -93,7 +96,7 @@ typedef struct _RTL_MESSAGE_RESOURCE_ENTRY
|
|||
{
|
||||
USHORT Length;
|
||||
USHORT Flags;
|
||||
UCHAR Text[1];
|
||||
CHAR Text[1];
|
||||
} RTL_MESSAGE_RESOURCE_ENTRY, *PRTL_MESSAGE_RESOURCE_ENTRY;
|
||||
|
||||
typedef struct _RTL_MESSAGE_RESOURCE_BLOCK
|
||||
|
|
|
@ -2492,6 +2492,18 @@ ZwResumeThread(
|
|||
OUT PULONG SuspendCount
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtResumeProcess(
|
||||
IN HANDLE ProcessHandle
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
ZwResumeProcess(
|
||||
IN HANDLE ProcessHandle
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtSaveKey(
|
||||
|
@ -3246,6 +3258,18 @@ ZwSuspendThread(
|
|||
IN PULONG PreviousSuspendCount
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtSuspendProcess(
|
||||
IN HANDLE ProcessHandle
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
ZwSuspendProcess(
|
||||
IN HANDLE ProcessHandle
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtTerminateThread(
|
||||
|
@ -3482,7 +3506,7 @@ NtCreateThread(
|
|||
NTSTATUS
|
||||
STDCALL
|
||||
NtDelayExecution(
|
||||
IN ULONG Alertable,
|
||||
IN BOOLEAN Alertable,
|
||||
IN LARGE_INTEGER *Interval
|
||||
);
|
||||
|
||||
|
@ -3603,12 +3627,12 @@ NtQueryVirtualMemory(
|
|||
NTSTATUS
|
||||
STDCALL
|
||||
NtRaiseHardError(
|
||||
IN NTSTATUS Status,
|
||||
ULONG Unknown2,
|
||||
ULONG Unknown3,
|
||||
ULONG Unknown4,
|
||||
ULONG Unknown5,
|
||||
ULONG Unknown6
|
||||
IN NTSTATUS ErrorStatus,
|
||||
IN ULONG NumberOfParameters,
|
||||
IN PUNICODE_STRING UnicodeStringParameterMask OPTIONAL,
|
||||
IN PVOID *Parameters,
|
||||
IN HARDERROR_RESPONSE_OPTION ResponseOption,
|
||||
OUT PHARDERROR_RESPONSE Response
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
/* CONSTANTS *****************************************************************/
|
||||
#define MAX_BUS_NAME 24
|
||||
|
||||
#define EVENT_PAIR_ALL_ACCESS (0x1F0000L)
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
typedef enum _PLUGPLAY_BUS_CLASS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue