Added service table pointer to KTHREAD.

svn path=/trunk/; revision=4905
This commit is contained in:
Eric Kohl 2003-06-16 16:45:52 +00:00
parent 8726fa1797
commit 322b60c160
4 changed files with 14 additions and 6 deletions

View file

@ -26,6 +26,7 @@
#define KTHREAD_STACK_LIMIT 0x1C
#define KTHREAD_TEB 0x20
#define KTHREAD_KERNEL_STACK 0x28
#define KTHREAD_SERVICE_TABLE 0xDC
#define KTHREAD_PREVIOUS_MODE 0x137
#define KTHREAD_TRAP_FRAME 0x128
#define KTHREAD_CALLBACK_STACK 0x120

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: ps.h,v 1.46 2003/06/07 10:14:39 chorns Exp $
/* $Id: ps.h,v 1.47 2003/06/16 16:45:03 ekohl Exp $
*
* FILE: ntoskrnl/ke/kthread.c
* PURPOSE: Process manager definitions
@ -107,7 +107,10 @@ typedef struct _KTHREAD
LONG KernelApcDisable; /* D0 */
KAFFINITY UserAffinity; /* D4 */
UCHAR SystemAffinityActive;/* D8 */
UCHAR Pad[7]; /* D9 */
UCHAR PowerState; /* D9 */
UCHAR NpxIrql; /* DA */
UCHAR Pad; /* DB */
SSDT_ENTRY *ServiceTable; /* DC */
PKQUEUE Queue; /* E0 */
KSPIN_LOCK ApcQueueLock; /* E4 */
KTIMER Timer; /* E8 */

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: kthread.c,v 1.38 2003/06/05 23:37:00 gdalsnes Exp $
/* $Id: kthread.c,v 1.39 2003/06/16 16:45:52 ekohl Exp $
*
* FILE: ntoskrnl/ke/kthread.c
* PURPOSE: Microkernel thread support
@ -76,7 +76,7 @@ KeReleaseThread(PETHREAD Thread)
return(STATUS_SUCCESS);
}
VOID
VOID
KeInitializeThread(PKPROCESS Process, PKTHREAD Thread, BOOLEAN First)
/*
* FUNCTION: Initialize the microkernel state of the thread
@ -186,6 +186,9 @@ KeInitializeThread(PKPROCESS Process, PKTHREAD Thread, BOOLEAN First)
Thread->KernelApcDisable = 1;
Thread->UserAffinity = Process->Affinity;
Thread->SystemAffinityActive = 0;
Thread->PowerState = 0;
Thread->NpxIrql = 0;
Thread->ServiceTable = KeServiceDescriptorTable;
Thread->Queue = NULL;
KeInitializeSpinLock(&Thread->ApcQueueLock);
memset(&Thread->Timer, 0, sizeof(KTIMER));
@ -214,7 +217,7 @@ KeInitializeThread(PKPROCESS Process, PKTHREAD Thread, BOOLEAN First)
Thread->AutoAlignment = 0;
KeInitializeApc(&Thread->SuspendApc,
Thread,
OriginalApcEnvironment,
OriginalApcEnvironment,
PiSuspendThreadKernelRoutine,
PiSuspendThreadRundownRoutine,
PiSuspendThreadNormalRoutine,

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: main.c,v 1.161 2003/06/14 17:46:24 hbirr Exp $
/* $Id: main.c,v 1.162 2003/06/16 16:45:52 ekohl Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/main.c
@ -324,6 +324,7 @@ ExpInitializeExecutive(VOID)
assert(FIELD_OFFSET(KTHREAD, InitialStack) == KTHREAD_INITIAL_STACK);
assert(FIELD_OFFSET(KTHREAD, Teb) == KTHREAD_TEB);
assert(FIELD_OFFSET(KTHREAD, KernelStack) == KTHREAD_KERNEL_STACK);
assert(FIELD_OFFSET(KTHREAD, ServiceTable) == KTHREAD_SERVICE_TABLE);
assert(FIELD_OFFSET(KTHREAD, PreviousMode) == KTHREAD_PREVIOUS_MODE);
assert(FIELD_OFFSET(KTHREAD, TrapFrame) == KTHREAD_TRAP_FRAME);
assert(FIELD_OFFSET(KTHREAD, CallbackStack) == KTHREAD_CALLBACK_STACK);