- SSPT elements are 8 bit wide on Windows. Made ReactOS binary compatible in this regard, since this affects a public function (KeAddSystemServiceTable)

- use a function pointer for SSDT elements. Function pointers aren't guaranteed to have the same size as data pointers (and we were using ULONG, anyway)
 - SSPT and SSDT types no longer structures to avoid pesky alignment issues
 - genw32k and genntdll fixed accordingly

svn path=/trunk/; revision=8996
This commit is contained in:
KJK::Hyperion 2004-04-07 00:14:05 +00:00
parent 6701beb03a
commit 9c7501f3dd
4 changed files with 13 additions and 23 deletions

View file

@ -1,4 +1,4 @@
/* $Id: genw32k.c,v 1.6 2003/12/03 21:50:49 gvg Exp $ /* $Id: genw32k.c,v 1.7 2004/04/07 00:14:05 hyperion Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS version of ntdll * PROJECT: ReactOS version of ntdll
@ -88,7 +88,7 @@ char *stmp;
* Now write the current system call's name * Now write the current system call's name
* in the service table. * in the service table.
*/ */
fprintf(out,"\t\t{ (ULONG)%s }",name); fprintf(out,"\t\t(PVOID (NTAPI *)(VOID))%s",name);
/* Next system call index */ /* Next system call index */
sys_call_idx++; sys_call_idx++;
@ -143,7 +143,7 @@ char *stmp;
* Now write the current system call's ID * Now write the current system call's ID
* in the service table along with its Parameters Size. * in the service table along with its Parameters Size.
*/ */
fprintf(out,"\t\t{ %d }",atoi(nr_args) * sizeof(void*)); fprintf(out,"\t\t%d",atoi(nr_args) * sizeof(void*));
/* Next system call index */ /* Next system call index */
sys_call_idx++; sys_call_idx++;

View file

@ -1,4 +1,4 @@
/* $Id: genntdll.c,v 1.13 2003/12/17 01:46:08 hyperion Exp $ /* $Id: genntdll.c,v 1.14 2004/04/07 00:14:05 hyperion Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS version of ntdll * PROJECT: ReactOS version of ntdll
@ -135,7 +135,7 @@ char *stmp;
* Now write the current system call's name * Now write the current system call's name
* in the service table. * in the service table.
*/ */
fprintf(out,"\t\t{ (ULONG)%s }",name); fprintf(out,"\t\t(PVOID (NTAPI *)(VOID))%s",name);
} }
} }
/* Close the service table (C syntax) */ /* Close the service table (C syntax) */
@ -194,7 +194,7 @@ char *stmp;
* Now write the current system call's ID * Now write the current system call's ID
* in the service table along with its Parameters Size. * in the service table along with its Parameters Size.
*/ */
fprintf(out,"\t\t{ %s }",nr_args); fprintf(out,"\t\t%s",nr_args);
} }
} }
/* /*

View file

@ -9,28 +9,21 @@
#ifndef __USE_W32API #ifndef __USE_W32API
#pragma pack(1)
/* System Service Dispatch Table */ /* System Service Dispatch Table */
typedef struct t_SSDT { typedef PVOID (NTAPI * SSDT)(VOID);
ULONG SysCallPtr; typedef SSDT * PSSDT;
} SSDT, *PSSDT;
/* System Service Parameters Table */ /* System Service Parameters Table */
typedef struct t_SSPT { typedef UCHAR SSPT, *PSSPT;
unsigned int ParamBytes;
} SSPT, *PSSPT;
typedef struct t_KeServiceDescriptorTableEntry { typedef struct t_KeServiceDescriptorTableEntry {
PSSDT SSDT; PSSDT SSDT;
PULONG ServiceCounterTable; PULONG ServiceCounterTable;
unsigned int NumberOfServices; ULONG NumberOfServices;
PSSPT SSPT; PSSPT SSPT;
} SSDT_ENTRY, *PSSDT_ENTRY; } SSDT_ENTRY, *PSSDT_ENTRY;
#pragma pack()
#endif /* __USE_W32API */ #endif /* __USE_W32API */

View file

@ -7114,14 +7114,11 @@ KeAcquireSpinLock(
OUT PKIRQL OldIrql); OUT PKIRQL OldIrql);
/* System Service Dispatch Table */ /* System Service Dispatch Table */
typedef struct _SSDT { typedef PVOID (NTAPI * SSDT)(VOID);
ULONG SysCallPtr; typedef SSDT * PSSDT;
} SSDT, *PSSDT;
/* System Service Parameters Table */ /* System Service Parameters Table */
typedef struct _SSPT { typedef UCHAR SSPT, * PSSPT;
ULONG ParamBytes;
} SSPT, *PSSPT;
typedef struct _SSDT_ENTRY { typedef struct _SSDT_ENTRY {
PSSDT SSDT; PSSDT SSDT;