ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
477 discussions
Start a n
N
ew thread
[ion] 14673: Fix incorrect replacement
by ion@svn.reactos.com
Fix incorrect replacement Modified: trunk/reactos/ntoskrnl/ke/kthread.c _____ Modified: trunk/reactos/ntoskrnl/ke/kthread.c --- trunk/reactos/ntoskrnl/ke/kthread.c 2005-04-18 15:51:21 UTC (rev 14672) +++ trunk/reactos/ntoskrnl/ke/kthread.c 2005-04-18 16:25:53 UTC (rev 14673) @@ -137,7 +137,7 @@ if (Candidate == CurrentThread) { - Candidate->State = Ready; + Candidate->State = Running; KeReleaseDispatcherDatabaseLockFromDpcLevel(); return; } @@ -149,7 +149,7 @@ DPRINT("Scheduling %x(%d)\n",Candidate, CurrentPriority); - Candidate->State = Ready; + Candidate->State = Running; OldThread = CurrentThread; CurrentThread = Candidate;
19 years, 8 months
1
0
0
0
[ion] 14672: Remove excess debugging
by ion@svn.reactos.com
Remove excess debugging Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c Modified: trunk/reactos/ntoskrnl/ps/kill.c Modified: trunk/reactos/ntoskrnl/ps/thread.c _____ Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c --- trunk/reactos/ntoskrnl/ex/sysinfo.c 2005-04-18 15:49:57 UTC (rev 14671) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c 2005-04-18 15:51:21 UTC (rev 14672) @@ -572,10 +572,8 @@ return (STATUS_INFO_LENGTH_MISMATCH); // in case buffer size is too small } - DPRINT1("getting next proc\n"); syspr = PsGetNextProcess(NULL); pr = syspr; - DPRINT1("next proc: %x\n", pr); pCur = (unsigned char *)Spi; do @@ -663,7 +661,6 @@ // SpiCur->Threads[i].CreateTime = current->CreateTime; SpiCur->Threads[i].WaitTime = current->Tcb.WaitTime; SpiCur->Threads[i].StartAddress = (PVOID) current->StartAddress; - DPRINT1("cid: %d\n", current->Cid.UniqueThread); SpiCur->Threads[i].ClientId = current->Cid; SpiCur->Threads[i].Priority = current->Tcb.Priority; SpiCur->Threads[i].BasePriority = current->Tcb.BasePriority; @@ -675,7 +672,6 @@ } pr = PsGetNextProcess(pr); - DPRINT1("next proc: %x\n", pr); nThreads = 0; if ((pr == syspr) || (pr == NULL)) { @@ -692,7 +688,6 @@ } *ReqSize = ovlSize; - DPRINT1("done\n"); return (STATUS_SUCCESS); } _____ Modified: trunk/reactos/ntoskrnl/ps/kill.c --- trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 15:49:57 UTC (rev 14671) +++ trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 15:51:21 UTC (rev 14672) @@ -160,7 +160,6 @@ } /* KDB hook */ - DPRINT1("deleted: %d\n", Process->UniqueProcessId); KDB_DELETEPROCESS_HOOK(Process); /* Dereference the Token and release Memory Information */ _____ Modified: trunk/reactos/ntoskrnl/ps/thread.c --- trunk/reactos/ntoskrnl/ps/thread.c 2005-04-18 15:49:57 UTC (rev 14671) +++ trunk/reactos/ntoskrnl/ps/thread.c 2005-04-18 15:51:21 UTC (rev 14672) @@ -567,7 +567,7 @@ /* create a client id handle */ Status = PsCreateCidHandle ( Thread, PsThreadType, &Thread->Cid.UniqueThread); - DPRINT1("cid: %d\n", Thread->Cid.UniqueThread); + if (!NT_SUCCESS(Status)) { ObDereferenceObject(Thread);
19 years, 8 months
1
0
0
0
[ion] 14671: Use official THREAD_STATE enumeration for thread states
by ion@svn.reactos.com
Use official THREAD_STATE enumeration for thread states Modified: trunk/reactos/include/ntos/zwtypes.h Modified: trunk/reactos/ntoskrnl/dbg/kdb_cli.c Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c Modified: trunk/reactos/ntoskrnl/include/internal/ke.h Modified: trunk/reactos/ntoskrnl/include/internal/ps.h Modified: trunk/reactos/ntoskrnl/kd/gdbstub.c Modified: trunk/reactos/ntoskrnl/ke/apc.c Modified: trunk/reactos/ntoskrnl/ke/dpc.c Modified: trunk/reactos/ntoskrnl/ke/i386/kernel.c Modified: trunk/reactos/ntoskrnl/ke/kthread.c Modified: trunk/reactos/ntoskrnl/ke/main.c Modified: trunk/reactos/ntoskrnl/ke/wait.c Modified: trunk/reactos/ntoskrnl/ps/kill.c Modified: trunk/reactos/ntoskrnl/ps/process.c Modified: trunk/reactos/ntoskrnl/ps/psmgr.c Modified: trunk/reactos/ntoskrnl/ps/thread.c _____ Modified: trunk/reactos/include/ntos/zwtypes.h --- trunk/reactos/include/ntos/zwtypes.h 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/include/ntos/zwtypes.h 2005-04-18 15:49:57 UTC (rev 14671) @@ -338,7 +338,7 @@ KPRIORITY Priority; LONG BasePriority; ULONG ContextSwitches; - ULONG ThreadState; + LONG ThreadState; KWAIT_REASON WaitReason; } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION; _____ Modified: trunk/reactos/ntoskrnl/dbg/kdb_cli.c --- trunk/reactos/ntoskrnl/dbg/kdb_cli.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/dbg/kdb_cli.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -878,10 +878,10 @@ ULONG Eip; ULONG ul = 0; PCHAR State, pend, str1, str2; - STATIC CONST PCHAR ThreadStateToString[THREAD_STATE_MAX] = + STATIC CONST PCHAR ThreadStateToString[DeferredReady+1] = { "Initialized", "Ready", "Running", - "Suspended", "Frozen", "Terminated1", - "Terminated2", "Blocked" }; + "Standby", "Terminated", "Waiting", + "Transition", "DeferredReady" }; ASSERT(KdbCurrentProcess != NULL); if (Argc >= 2 && _stricmp(Argv[1], "list") == 0) @@ -943,7 +943,7 @@ if (Ebp != NULL) /* FIXME: Should we attach to the process to read Ebp[1]? */ KdbpSafeReadMemory(&Eip, Ebp + 1, sizeof (Eip));; } - if (Thread->Tcb.State < THREAD_STATE_MAX) + if (Thread->Tcb.State < (DeferredReady + 1)) State = ThreadStateToString[Thread->Tcb.State]; else State = "Unknown"; @@ -1001,7 +1001,7 @@ } } - if (Thread->Tcb.State < THREAD_STATE_MAX) + if (Thread->Tcb.State < (DeferredReady + 1)) State = ThreadStateToString[Thread->Tcb.State]; else State = "Unknown"; _____ Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c --- trunk/reactos/ntoskrnl/ex/sysinfo.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -572,8 +572,10 @@ return (STATUS_INFO_LENGTH_MISMATCH); // in case buffer size is too small } + DPRINT1("getting next proc\n"); syspr = PsGetNextProcess(NULL); pr = syspr; + DPRINT1("next proc: %x\n", pr); pCur = (unsigned char *)Spi; do @@ -661,6 +663,7 @@ // SpiCur->Threads[i].CreateTime = current->CreateTime; SpiCur->Threads[i].WaitTime = current->Tcb.WaitTime; SpiCur->Threads[i].StartAddress = (PVOID) current->StartAddress; + DPRINT1("cid: %d\n", current->Cid.UniqueThread); SpiCur->Threads[i].ClientId = current->Cid; SpiCur->Threads[i].Priority = current->Tcb.Priority; SpiCur->Threads[i].BasePriority = current->Tcb.BasePriority; @@ -670,8 +673,9 @@ i++; current_entry = current_entry->Flink; } - + pr = PsGetNextProcess(pr); + DPRINT1("next proc: %x\n", pr); nThreads = 0; if ((pr == syspr) || (pr == NULL)) { @@ -688,6 +692,7 @@ } *ReqSize = ovlSize; + DPRINT1("done\n"); return (STATUS_SUCCESS); } _____ Modified: trunk/reactos/ntoskrnl/include/internal/ke.h --- trunk/reactos/ntoskrnl/include/internal/ke.h 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/include/internal/ke.h 2005-04-18 15:49:57 UTC (rev 14671) @@ -49,6 +49,17 @@ #define IPI_REQUEST_DPC 2 #define IPI_REQUEST_FREEZE 3 +typedef enum _KTHREAD_STATE { + Initialized, + Ready, + Running, + Standby, + Terminated, + Waiting, + Transition, + DeferredReady, +} THREAD_STATE, *PTHREAD_STATE; + /* MACROS ************************************************************************ */ #define KeEnterCriticalRegion(X) \ _____ Modified: trunk/reactos/ntoskrnl/include/internal/ps.h --- trunk/reactos/ntoskrnl/include/internal/ps.h 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/include/internal/ps.h 2005-04-18 15:49:57 UTC (rev 14671) @@ -496,15 +496,6 @@ PspInitializeProcessSecurity(PEPROCESS Process, PEPROCESS Parent OPTIONAL); -#define THREAD_STATE_INITIALIZED (0) -#define THREAD_STATE_READY (1) -#define THREAD_STATE_RUNNING (2) -#define THREAD_STATE_SUSPENDED (3) -#define THREAD_STATE_FROZEN (4) -#define THREAD_STATE_TERMINATED_1 (5) -#define THREAD_STATE_TERMINATED_2 (6) -#define THREAD_STATE_BLOCKED (7) -#define THREAD_STATE_MAX (8) /* _____ Modified: trunk/reactos/ntoskrnl/kd/gdbstub.c --- trunk/reactos/ntoskrnl/kd/gdbstub.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/kd/gdbstub.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -150,17 +150,16 @@ { 4, FIELD_OFFSET (KTRAP_FRAME_X86, Fs), FIELD_OFFSET (CONTEXT, SegFs), TRUE }, { 4, FIELD_OFFSET (KTRAP_FRAME_X86, Gs), FIELD_OFFSET (CONTEXT, SegGs), TRUE } }; - -static PCHAR GspThreadStates[THREAD_STATE_MAX] = -{ - "Initialized", /* THREAD_STATE_INITIALIZED */ - "Ready", /* THREAD_STATE_READY */ - "Running", /* THREAD_STATE_RUNNING */ - "Suspended", /* THREAD_STATE_SUSPENDED */ - "Frozen", /* THREAD_STATE_FROZEN */ - "Terminated 1", /* THREAD_STATE_TERMINATED_1 */ - "Terminated 2", /* THREAD_STATE_TERMINATED_2 */ - "Blocked" /* THREAD_STATE_BLOCKED */ + +static PCHAR GspThreadStates[DeferredReady+1] = +{ "Initialized", + "Ready", + "Running", + "Standby", + "Terminated", + "Waiting", + "Transition", + "DeferredReady" }; char * _____ Modified: trunk/reactos/ntoskrnl/ke/apc.c --- trunk/reactos/ntoskrnl/ke/apc.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ke/apc.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -313,13 +313,13 @@ Thread->ApcState.KernelApcPending = TRUE; /* Check the Thread State */ - if (Thread->State == THREAD_STATE_RUNNING) { + if (Thread->State == Running) { /* FIXME: Use IPI */ DPRINT ("Requesting APC Interrupt for Running Thread \n"); HalRequestSoftwareInterrupt(APC_LEVEL); - } else if ((Thread->State == THREAD_STATE_BLOCKED) && (Thread->WaitIrql == PASSIVE_LEVEL) && + } else if ((Thread->State == Waiting) && (Thread->WaitIrql == PASSIVE_LEVEL) && ((Apc->NormalRoutine == NULL) || ((!Thread->KernelApcDisable) && (!Thread->ApcState.KernelApcInProgress)))) { @@ -327,7 +327,7 @@ KiAbortWaitThread(Thread, STATUS_KERNEL_APC, PriorityBoost); } - } else if ((Thread->State == THREAD_STATE_BLOCKED) && + } else if ((Thread->State == Waiting) && (Thread->WaitMode == UserMode) && (Thread->Alertable)) { _____ Modified: trunk/reactos/ntoskrnl/ke/dpc.c --- trunk/reactos/ntoskrnl/ke/dpc.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ke/dpc.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -491,7 +491,7 @@ /* Dispatch the Thread */ KeLowerIrql(DISPATCH_LEVEL); - KiDispatchThread(THREAD_STATE_READY); + KiDispatchThread(Ready); } /* _____ Modified: trunk/reactos/ntoskrnl/ke/i386/kernel.c --- trunk/reactos/ntoskrnl/ke/i386/kernel.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ke/i386/kernel.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -146,7 +146,7 @@ NULL, KernelMode, FALSE); - IdleThread->Tcb.State = THREAD_STATE_RUNNING; + IdleThread->Tcb.State = Running; IdleThread->Tcb.FreezeCount = 0; IdleThread->Tcb.Affinity = 1 << Id; IdleThread->Tcb.UserAffinity = 1 << Id; _____ Modified: trunk/reactos/ntoskrnl/ke/kthread.c --- trunk/reactos/ntoskrnl/ke/kthread.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ke/kthread.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -45,7 +45,7 @@ KiInsertIntoThreadList(KPRIORITY Priority, PKTHREAD Thread) { - ASSERT(THREAD_STATE_READY == Thread->State); + ASSERT(Ready == Thread->State); ASSERT(Thread->Priority == Priority); if (Priority >= MAXIMUM_PRIORITY || Priority < LOW_PRIORITY) { @@ -62,7 +62,7 @@ VOID KiRemoveFromThreadList(PKTHREAD Thread) { - ASSERT(THREAD_STATE_READY == Thread->State); + ASSERT(Ready == Thread->State); RemoveEntryList(&Thread->QueueListEntry); if (IsListEmpty(&PriorityListHead[(ULONG)Thread->Priority])) { @@ -89,12 +89,12 @@ current = CONTAINING_RECORD(current_entry, KTHREAD, QueueListEntry); - if (current->State != THREAD_STATE_READY) { + if (current->State != Ready) { DPRINT1("%d/%d\n", ¤t, current->State); } - ASSERT(current->State == THREAD_STATE_READY); + ASSERT(current->State == Ready); if (current->Affinity & Affinity) { @@ -123,7 +123,7 @@ CurrentThread->State = (UCHAR)NewThreadStatus; - if (NewThreadStatus == THREAD_STATE_READY) { + if (NewThreadStatus == Ready) { KiInsertIntoThreadList(CurrentThread->Priority, CurrentThread); @@ -137,7 +137,7 @@ if (Candidate == CurrentThread) { - Candidate->State = THREAD_STATE_RUNNING; + Candidate->State = Ready; KeReleaseDispatcherDatabaseLockFromDpcLevel(); return; } @@ -149,7 +149,7 @@ DPRINT("Scheduling %x(%d)\n",Candidate, CurrentPriority); - Candidate->State = THREAD_STATE_RUNNING; + Candidate->State = Ready; OldThread = CurrentThread; CurrentThread = Candidate; @@ -199,7 +199,7 @@ Thread->WaitBlockList = NULL; /* Dispatch it and return status */ - KiDispatchThreadNoLock (THREAD_STATE_READY); + KiDispatchThreadNoLock (Ready); if (Status != NULL) *Status = STATUS_KERNEL_APC; } else { @@ -211,7 +211,7 @@ Thread->WaitReason = WaitReason; /* Dispatch it and return status */ - KiDispatchThreadNoLock(THREAD_STATE_BLOCKED); + KiDispatchThreadNoLock(Waiting); DPRINT("Dispatching Thread as blocked: %d\n", Thread->WaitStatus); if (Status != NULL) *Status = Thread->WaitStatus; } @@ -241,17 +241,16 @@ PNTSTATUS WaitStatus, KPRIORITY Increment) { - if (THREAD_STATE_TERMINATED_1 == Thread->State || - THREAD_STATE_TERMINATED_2 == Thread->State) { + if (Terminated == Thread->State) { DPRINT("Can't unblock thread 0x%x because it's terminating\n", Thread); - } else if (THREAD_STATE_READY == Thread->State || - THREAD_STATE_RUNNING == Thread->State) { + } else if (Ready == Thread->State || + Running == Thread->State) { DPRINT("Can't unblock thread 0x%x because it's %s\n", - Thread, (Thread->State == THREAD_STATE_READY ? "ready" : "running")); + Thread, (Thread->State == Ready ? "ready" : "running")); } else { @@ -279,7 +278,7 @@ Thread->WaitStatus = *WaitStatus; } - Thread->State = THREAD_STATE_READY; + Thread->State = Ready; KiInsertIntoThreadList(Thread->Priority, Thread); Processor = KeGetCurrentProcessorNumber(); Affinity = Thread->Affinity; @@ -588,7 +587,7 @@ if (Thread->Alerted[KernelMode] == FALSE) { /* If it's Blocked, unblock if it we should */ - if (Thread->State == THREAD_STATE_BLOCKED && Thread->Alertable) { + if (Thread->State == Waiting && Thread->Alertable) { DPRINT("Aborting Wait\n"); KiAbortWaitThread(Thread, STATUS_ALERTED, THREAD_ALERT_INCREMENT); @@ -639,7 +638,7 @@ if (PreviousState == FALSE) { /* If it's Blocked, unblock if it we should */ - if (Thread->State == THREAD_STATE_BLOCKED && + if (Thread->State == Waiting && (AlertMode == KernelMode || Thread->WaitMode == AlertMode) && Thread->Alertable) { @@ -779,7 +778,7 @@ MmUpdatePageDir((PEPROCESS)Process, (PVOID)Thread, sizeof(ETHREAD)); /* Set the Thread to initalized */ - Thread->State = THREAD_STATE_INITIALIZED; + Thread->State = Initialized; /* The Native API function will initialize the TEB field later */ Thread->Teb = NULL; @@ -1017,7 +1016,7 @@ /* We need to dispatch a new thread */ CurrentThread->WaitIrql = OldIrql; - KiDispatchThreadNoLock(THREAD_STATE_READY); + KiDispatchThreadNoLock(Ready); KeLowerIrql(OldIrql); } } @@ -1080,7 +1079,7 @@ /* We need to dispatch a new thread */ CurrentThread->WaitIrql = OldIrql; - KiDispatchThreadNoLock(THREAD_STATE_READY); + KiDispatchThreadNoLock(Ready); KeLowerIrql(OldIrql); } } @@ -1146,7 +1145,7 @@ CurrentThread = KeGetCurrentThread(); - if (Thread->State == THREAD_STATE_READY) { + if (Thread->State == Ready) { KiRemoveFromThreadList(Thread); Thread->BasePriority = Thread->Priority = (CHAR)Priority; @@ -1154,12 +1153,12 @@ if (CurrentThread->Priority < Priority) { - KiDispatchThreadNoLock(THREAD_STATE_READY); + KiDispatchThreadNoLock(Ready); KeLowerIrql(OldIrql); return (OldPriority); } - } else if (Thread->State == THREAD_STATE_RUNNING) { + } else if (Thread->State == Running) { Thread->BasePriority = Thread->Priority = (CHAR)Priority; @@ -1171,7 +1170,7 @@ if (Thread == CurrentThread) { - KiDispatchThreadNoLock(THREAD_STATE_READY); + KiDispatchThreadNoLock(Ready); KeLowerIrql(OldIrql); return (OldPriority); @@ -1229,14 +1228,14 @@ Thread->Affinity = Affinity; - if (Thread->State == THREAD_STATE_RUNNING) { + if (Thread->State == Running) { ProcessorMask = 1 << KeGetCurrentKPCR()->ProcessorNumber; if (Thread == KeGetCurrentThread()) { if (!(Affinity & ProcessorMask)) { - KiDispatchThreadNoLock(THREAD_STATE_READY); + KiDispatchThreadNoLock(Ready); KeLowerIrql(OldIrql); return STATUS_SUCCESS; } @@ -1318,7 +1317,7 @@ } /* Find a new Thread */ - KiDispatchThreadNoLock(THREAD_STATE_TERMINATED_1); + KiDispatchThreadNoLock(Terminated); } /* _____ Modified: trunk/reactos/ntoskrnl/ke/main.c --- trunk/reactos/ntoskrnl/ke/main.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ke/main.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -53,7 +53,6 @@ ULONG_PTR FirstKrnlPhysAddr; ULONG_PTR LastKrnlPhysAddr; ULONG_PTR LastKernelAddress; -volatile BOOLEAN Initialized = FALSE; ULONG KeLargestCacheLine = 0x40; /* FIXME: Arch-specific */ _____ Modified: trunk/reactos/ntoskrnl/ke/wait.c --- trunk/reactos/ntoskrnl/ke/wait.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ke/wait.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -724,7 +724,7 @@ /* If we are blocked, we must be waiting on something also */ DPRINT("KiAbortWaitThread: %x, Status: %x, %x \n", Thread, WaitStatus, Thread->WaitBlockList); - ASSERT((Thread->State == THREAD_STATE_BLOCKED) == (Thread->WaitBlockList != NULL)); + ASSERT((Thread->State == Waiting) == (Thread->WaitBlockList != NULL)); /* Remove the Wait Blocks from the list */ DPRINT("Removing waits\n"); @@ -886,7 +886,7 @@ if (!KeIsExecutingDpc() && OldIrql < DISPATCH_LEVEL && KeGetCurrentThread() != NULL && KeGetCurrentThread() == KeGetCurrentPrcb()->IdleThread) { - KiDispatchThreadNoLock(THREAD_STATE_READY); + KiDispatchThreadNoLock(Ready); KeLowerIrql(OldIrql); } else { _____ Modified: trunk/reactos/ntoskrnl/ps/kill.c --- trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -151,7 +151,7 @@ { PEPROCESS Process = (PEPROCESS)ObjectBody; - DPRINT1("PiDeleteProcess(ObjectBody %x)\n",Process->UniqueProcessId); + DPRINT("PiDeleteProcess(ObjectBody %x)\n", ObjectBody); /* Delete the CID Handle */ if(Process->UniqueProcessId != NULL) { @@ -160,6 +160,7 @@ } /* KDB hook */ + DPRINT1("deleted: %d\n", Process->UniqueProcessId); KDB_DELETEPROCESS_HOOK(Process); /* Dereference the Token and release Memory Information */ _____ Modified: trunk/reactos/ntoskrnl/ps/process.c --- trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -363,6 +363,7 @@ Status = PsCreateCidHandle(Process, PsProcessType, &Process->UniqueProcessId); + DPRINT1("Created CID: %d\n", Process->UniqueProcessId); if(!NT_SUCCESS(Status)) { DPRINT1("Failed to create CID handle (unique process ID)! Status: 0x%x\n", Status); @@ -872,7 +873,7 @@ if (ClientId->UniqueThread) { /* Get the Process */ - DPRINT("Opening by Thread ID: %x\n", ClientId->UniqueThread); + DPRINT1("Opening by Thread ID: %x\n", ClientId->UniqueThread); Status = PsLookupProcessThreadByCid(ClientId, &Process, &Thread); @@ -881,7 +882,7 @@ else { /* Get the Process */ - DPRINT("Opening by Process ID: %x\n", ClientId->UniqueProcess); + DPRINT1("Opening by Process ID: %x\n", ClientId->UniqueProcess); Status = PsLookupProcessByProcessId(ClientId->UniqueProcess, &Process); DPRINT("Found: %x\n", Process); _____ Modified: trunk/reactos/ntoskrnl/ps/psmgr.c --- trunk/reactos/ntoskrnl/ps/psmgr.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ps/psmgr.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -104,7 +104,7 @@ ObpCreateTypeObject(PsThreadType); PsInitializeThread(NULL, &FirstThread, NULL, KernelMode, TRUE); - FirstThread->Tcb.State = THREAD_STATE_RUNNING; + FirstThread->Tcb.State = Running; FirstThread->Tcb.FreezeCount = 0; FirstThread->Tcb.UserAffinity = (1 << 0); /* Set the affinity of the first thread to the boot processor */ FirstThread->Tcb.Affinity = (1 << 0); _____ Modified: trunk/reactos/ntoskrnl/ps/thread.c --- trunk/reactos/ntoskrnl/ps/thread.c 2005-04-18 14:56:52 UTC (rev 14670) +++ trunk/reactos/ntoskrnl/ps/thread.c 2005-04-18 15:49:57 UTC (rev 14671) @@ -164,9 +164,9 @@ Thread->ThreadsProcess->UniqueProcessId, Thread->Cid.UniqueThread, Thread->ThreadsProcess->ImageFileName); - if(Thread->Tcb.State == THREAD_STATE_READY || - Thread->Tcb.State == THREAD_STATE_SUSPENDED || - Thread->Tcb.State == THREAD_STATE_BLOCKED) + if(Thread->Tcb.State == Ready || + Thread->Tcb.State == Standby || + Thread->Tcb.State == Waiting) { ULONG i = 0; PULONG Esp = (PULONG)Thread->Tcb.KernelStack; @@ -567,6 +567,7 @@ /* create a client id handle */ Status = PsCreateCidHandle ( Thread, PsThreadType, &Thread->Cid.UniqueThread); + DPRINT1("cid: %d\n", Thread->Cid.UniqueThread); if (!NT_SUCCESS(Status)) { ObDereferenceObject(Thread); @@ -760,7 +761,7 @@ NTSTATUS STDCALL NtYieldExecution(VOID) { - KiDispatchThread(THREAD_STATE_READY); + KiDispatchThread(Ready); return(STATUS_SUCCESS); }
19 years, 8 months
1
0
0
0
[ion] 14670: Fix win32k
by ion@svn.reactos.com
Fix win32k Modified: trunk/reactos/ntoskrnl/include/internal/ps.h _____ Modified: trunk/reactos/ntoskrnl/include/internal/ps.h --- trunk/reactos/ntoskrnl/include/internal/ps.h 2005-04-18 14:13:03 UTC (rev 14669) +++ trunk/reactos/ntoskrnl/include/internal/ps.h 2005-04-18 14:56:52 UTC (rev 14670) @@ -533,7 +533,6 @@ extern BOOLEAN PspReaping; extern PEPROCESS PsInitialSystemProcess; extern PEPROCESS PsIdleProcess; -extern POBJECT_TYPE PsProcessType; extern LIST_ENTRY PsActiveProcessHead; extern FAST_MUTEX PspActiveProcessMutex; extern LARGE_INTEGER ShortPsLockDelay, PsLockTimeout;
19 years, 8 months
1
0
0
0
[ion] 14669: Forgot this...sorry..it was 3am
by ion@svn.reactos.com
Forgot this...sorry..it was 3am Modified: trunk/reactos/include/ddk/kefuncs.h Modified: trunk/reactos/include/napi/teb.h Modified: trunk/reactos/include/ntos/tss.h Modified: trunk/reactos/include/ntos/zwtypes.h _____ Modified: trunk/reactos/include/ddk/kefuncs.h --- trunk/reactos/include/ddk/kefuncs.h 2005-04-18 13:27:16 UTC (rev 14668) +++ trunk/reactos/include/ddk/kefuncs.h 2005-04-18 14:13:03 UTC (rev 14669) @@ -28,7 +28,7 @@ VOID KeDrainApcQueue(VOID); -struct _KPROCESS* KeGetCurrentProcess(VOID); +struct _KPROCESS* STDCALL KeGetCurrentProcess(VOID); /* * FUNCTION: Acquires a spinlock so the caller can synchronize access to _____ Modified: trunk/reactos/include/napi/teb.h --- trunk/reactos/include/napi/teb.h 2005-04-18 13:27:16 UTC (rev 14668) +++ trunk/reactos/include/napi/teb.h 2005-04-18 14:13:03 UTC (rev 14669) @@ -86,6 +86,7 @@ /* RTL_USER_PROCESS_PARAMETERS.Flags */ #define PPF_NORMALIZED (1) +#define TEB_BASE (0x7FFDE000) #define PEB_BASE (0x7FFDF000) typedef struct _PEB_LDR_DATA _____ Modified: trunk/reactos/include/ntos/tss.h --- trunk/reactos/include/ntos/tss.h 2005-04-18 13:27:16 UTC (rev 14668) +++ trunk/reactos/include/ntos/tss.h 2005-04-18 14:13:03 UTC (rev 14669) @@ -6,6 +6,7 @@ #define __INCLUDE_DDK_I386_TSS_H #define KTSS_ESP0 (0x4) +#define KTSS_CR3 (0x1C) #define KTSS_EFLAGS (0x24) #define KTSS_IOMAPBASE (0x66) _____ Modified: trunk/reactos/include/ntos/zwtypes.h --- trunk/reactos/include/ntos/zwtypes.h 2005-04-18 13:27:16 UTC (rev 14668) +++ trunk/reactos/include/ntos/zwtypes.h 2005-04-18 14:13:03 UTC (rev 14669) @@ -31,17 +31,6 @@ } HighWord; } LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY; -typedef enum _THREAD_STATE { - StateInitialized, - StateReady, - StateRunning, - StateStandby, - StateTerminated, - StateWait, - StateTransition, - StateUnknown -} THREAD_STATE; - typedef enum _DEBUG_CONTROL_CODE { DebugGetTraceInformation = 1, @@ -1325,7 +1314,7 @@ KPRIORITY Priority; KPRIORITY BasePriority; ULONG ContextSwitchCount; - THREAD_STATE State; + ULONG State; KWAIT_REASON WaitReason; } SYSTEM_THREADS, *PSYSTEM_THREADS;
19 years, 8 months
1
0
0
0
[gvg] 14668: Roman Hoegg <roman.hoegg@unisg.ch>
by gvg@svn.reactos.com
Roman Hoegg <roman.hoegg(a)unisg.ch> Add support for Swiss German keyboards Modified: trunk/reactos/Makefile Modified: trunk/reactos/bootdata/packages/reactos.dff Added: trunk/reactos/lib/kbdsg/ Added: trunk/reactos/lib/kbdsg/Jamfile Added: trunk/reactos/lib/kbdsg/kbdsg.c Added: trunk/reactos/lib/kbdsg/kbdsg.def Added: trunk/reactos/lib/kbdsg/kbdsg.rc Added: trunk/reactos/lib/kbdsg/makefile _____ Modified: trunk/reactos/Makefile --- trunk/reactos/Makefile 2005-04-18 05:47:13 UTC (rev 14667) +++ trunk/reactos/Makefile 2005-04-18 13:27:16 UTC (rev 14668) @@ -48,7 +48,7 @@ LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid strmiids crt rossym wdmguid # Keyboard layout libraries -DLLS_KBD = kbdda kbddv kbdes kbdfr kbdgr kbdru kbdse kbduk kbdus +DLLS_KBD = kbdda kbddv kbdes kbdfr kbdgr kbdru kbdse kbdsg kbduk kbdus # Control Panels DLLS_CPL = cpl _____ Modified: trunk/reactos/bootdata/packages/reactos.dff --- trunk/reactos/bootdata/packages/reactos.dff 2005-04-18 05:47:13 UTC (rev 14667) +++ trunk/reactos/bootdata/packages/reactos.dff 2005-04-18 13:27:16 UTC (rev 14668) @@ -90,6 +90,7 @@ lib\kbdgr\kbdgr.dll 1 lib\kbdru\kbdru.dll 1 lib\kbdse\kbdse.dll 1 +lib\kbdda\kbdsg.dll 1 lib\kbduk\kbduk.dll 1 lib\kbdus\kbdus.dll 1 lib\kernel32\kernel32.dll 1 Property changes on: trunk/reactos/lib/kbdsg ___________________________________________________________________ Name: svn:ignore + temp.exp *.a *.o *.bin *.dll *.lib *.coff *.sym *.tmp *.map *.d _____ Added: trunk/reactos/lib/kbdsg/Jamfile --- trunk/reactos/lib/kbdsg/Jamfile 2005-04-18 05:47:13 UTC (rev 14667) +++ trunk/reactos/lib/kbdsg/Jamfile 2005-04-18 13:27:16 UTC (rev 14668) @@ -0,0 +1,15 @@ +SubDir ROS_TOP lib kbdsg ; + +# This stuff should actually be moved to Jamrules +# in order to more easily support other compilers +CCFLAGS += -Wall -fno-builtin ; + +# NOTE - I'm no Jam expert, yet. This stuff should be +# abstracted into the Jamrules file. +LINKFLAGS = -nostartfiles -nostdlib -shared ; +LINKFLAGS += -Wl,--image-base,0x77F00000 -lgcc ; + +SRCS = kbdsg + +SharedLibrary kbdsg : $(SRCS) ; +LINKLIBS = ; Property changes on: trunk/reactos/lib/kbdsg/Jamfile ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/kbdsg/kbdsg.c --- trunk/reactos/lib/kbdsg/kbdsg.c 2005-04-18 05:47:13 UTC (rev 14667) +++ trunk/reactos/lib/kbdsg/kbdsg.c 2005-04-18 13:27:16 UTC (rev 14668) @@ -0,0 +1,529 @@ +/* + * ReactOS German (Switzerland) ASCII Keyboard layout + * Copyright (C) 2005 ReactOS + * License: LGPL, see: LGPL.txt + * + * Thanks to:
http://www.barcodeman.com/altek/mule/scandoc.php
+ * and
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html
+ * and
http://www.unicode.org/charts/
+ */ + + +#include <windows.h> +#include <internal/kbd.h> + +#ifdef _M_IA64 +#define ROSDATA static __declspec(allocate(".data")) +#else +#pragma data_seg(".data") +#define ROSDATA static +#endif + +#define VK_EMPTY 0xff /* The non-existent VK */ +#define KSHIFT 0x001 /* Shift modifier */ +#define KCTRL 0x002 /* Ctrl modifier */ +#define KALT 0x004 /* Alt modifier */ +#define KEXT 0x100 /* Extended key code */ +#define KMULTI 0x200 /* Multi-key */ +#define KSPEC 0x400 /* Special key */ +#define KNUMP 0x800 /* Number-pad */ +#define KNUMS 0xc00 /* Special + number pad */ +#define KMEXT 0x300 /* Multi + ext */ + +#define SHFT_INVALID 0x0F + +/* Thanks to
http://asp.flaaten.dk/pforum/keycode/keycode.htm
*/ +#ifndef VK_OEM_1 +#define VK_OEM_1 0xba +#endif +#ifndef VK_OEM_PLUS +#define VK_OEM_PLUS 0xbb /* actually this is ¿ ! ] on the Swiss German Keyboard */ +#endif +#ifndef VK_OEM_COMMA +#define VK_OEM_COMMA 0xbc +#endif +#ifndef VK_OEM_MINUS +#define VK_OEM_MINUS 0xbd +#endif +#ifndef VK_OEM_PERIOD +#define VK_OEM_PERIOD 0xbe +#endif +#ifndef VK_OEM_2 +#define VK_OEM_2 0xbf +#endif +#ifndef VK_OEM_3 +#define VK_OEM_3 0xc0 +#endif +#ifndef VK_OEM_4 +#define VK_OEM_4 0xdb +#endif +#ifndef VK_OEM_5 +#define VK_OEM_5 0xdc +#endif +#ifndef VK_OEM_6 +#define VK_OEM_6 0xdd +#endif +#ifndef VK_OEM_7 +#define VK_OEM_7 0xde +#endif +#ifndef VK_OEM_8 +#define VK_OEM_8 0xdf +#endif +#ifndef VK_OEM_102 +#define VK_OEM_102 0xe1 +#endif + +ROSDATA USHORT scancode_to_vk[] = { + /* Numbers Row */ + /* - 00 - */ + /* 1 ... 2 ... 3 ... 4 ... */ + VK_EMPTY, VK_ESCAPE, '1', '2', + '3', '4', '5', '6', + '7', '8', '9', '0', + VK_OEM_4, VK_OEM_6, VK_BACK, + /* - 0f - */ + /* First Letters Row */ + VK_TAB, 'Q', 'W', 'E', + 'R', 'T', 'Z', 'U', + 'I', 'O', 'P', + VK_OEM_1, VK_OEM_PLUS, VK_RETURN, + /* - 1d - */ + /* Second Letters Row */ + VK_LCONTROL, + 'A', 'S', 'D', 'F', + 'G', 'H', 'J', 'K', + 'L', VK_OEM_3, VK_OEM_7, VK_OEM_5, + /* - 2c - */ + /* Third letters row */ + VK_LSHIFT, VK_OEM_2, + 'Y', 'X', 'C', 'V', + 'B', 'N', 'M', VK_OEM_COMMA, + VK_OEM_PERIOD, VK_OEM_MINUS, VK_RSHIFT, + /* - 37 - */ + /* Bottom Row */ + VK_MULTIPLY, VK_LMENU, VK_SPACE, VK_CAPITAL, + + /* - 3b - */ + /* F-Keys */ + VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6, + VK_F7, VK_F8, VK_F9, VK_F10, + /* - 45 - */ + /* Locks */ + VK_NUMLOCK | KMEXT, + VK_SCROLL | KMULTI, + /* - 47 - */ + /* Number-Pad */ + VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT, + VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD, + VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS, + VK_INSERT | KNUMS, VK_DELETE | KNUMS, + /* - 54 - */ + /* Presumably PrtSc */ + VK_SNAPSHOT, + /* - 55 - */ + /* Oddities, and the remaining standard F-Keys */ + VK_EMPTY, VK_OEM_102, VK_F11, VK_F12, + /* - 59 - */ + VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */ + VK_HELP, + /* - 64 - */ + /* Even more F-Keys (for example, NCR keyboards from the early 90's) */ + VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20, + VK_F21, VK_F22, VK_F23, + /* - 6f - */ + /* Not sure who uses these codes */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, + /* - 72 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + /* - 76 - */ + /* One more f-key */ + VK_F24, + /* - 77 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ + VK_EMPTY, + /* - 80 - */ + 0 +}; + +ROSDATA VSC_VK extcode0_to_vk[] = { + { 0x10, VK_MEDIA_PREV_TRACK | KEXT }, + { 0x19, VK_MEDIA_NEXT_TRACK | KEXT }, + { 0x1D, VK_RCONTROL | KEXT }, + { 0x20, VK_VOLUME_MUTE | KEXT }, + { 0x21, VK_LAUNCH_APP2 | KEXT }, + { 0x22, VK_MEDIA_PLAY_PAUSE | KEXT }, + { 0x24, VK_MEDIA_STOP | KEXT }, + { 0x2E, VK_VOLUME_DOWN | KEXT }, + { 0x30, VK_VOLUME_UP | KEXT }, + { 0x32, VK_BROWSER_HOME | KEXT }, + { 0x35, VK_DIVIDE | KEXT }, + { 0x37, VK_SNAPSHOT | KEXT }, + { 0x38, VK_RMENU | KEXT }, + { 0x47, VK_HOME | KEXT }, + { 0x48, VK_UP | KEXT }, + { 0x49, VK_PRIOR | KEXT }, + { 0x4B, VK_LEFT | KEXT }, + { 0x4D, VK_RIGHT | KEXT }, + { 0x4F, VK_END | KEXT }, + { 0x50, VK_DOWN | KEXT }, + { 0x51, VK_NEXT | KEXT }, + { 0x52, VK_INSERT | KEXT }, + { 0x53, VK_DELETE | KEXT }, + { 0x5B, VK_LWIN | KEXT }, + { 0x5C, VK_RWIN | KEXT }, + { 0x5D, VK_APPS | KEXT }, + { 0x5F, VK_SLEEP | KEXT }, + { 0x65, VK_BROWSER_SEARCH | KEXT }, + { 0x66, VK_BROWSER_FAVORITES | KEXT }, + { 0x67, VK_BROWSER_REFRESH | KEXT }, + { 0x68, VK_BROWSER_STOP | KEXT }, + { 0x69, VK_BROWSER_FORWARD | KEXT }, + { 0x6A, VK_BROWSER_BACK | KEXT }, + { 0x6B, VK_LAUNCH_APP1 | KEXT }, + { 0x6C, VK_LAUNCH_MAIL | KEXT }, + { 0x6D, VK_LAUNCH_MEDIA_SELECT | KEXT }, + { 0x1C, VK_RETURN | KEXT }, + { 0x46, VK_CANCEL | KEXT }, + { 0, 0 }, +}; + +ROSDATA VSC_VK extcode1_to_vk[] = { + { 0x1d, VK_PAUSE}, + { 0, 0 }, +}; + +ROSDATA VK_TO_BIT modifier_keys[] = { + { VK_SHIFT, KSHIFT }, + { VK_CONTROL, KCTRL }, + { VK_MENU, KALT }, + { 0, 0 } +}; + +typedef struct _mymod { + PVOID mod_keys; + WORD maxmod; + BYTE mod_max[7]; +} INTERNAL_KBD_MODIFIERS; + +ROSDATA INTERNAL_KBD_MODIFIERS modifier_bits[] = { + modifier_keys, + 6, + { 0, 1, 3, 4, SHFT_INVALID, SHFT_INVALID, 2 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT, MENU, SHIFT + MENU, CTRL + MENU */ +}; + + +/* ############################################ */ +/* ############################################ */ +/* ############################################ */ +/* ############################################ */ +/* ############################################ */ + +#define NOCAPS 0 +#define CAPS KSHIFT /* Caps -> shift */ + +ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { + { VK_OEM_5, NOCAPS, 0xa7, 0xb0}, /* º ? */ + + /* Normal vs Shifted */ + /* The numbers */ + /* Ctrl-2 generates NUL */ + { 0xff, NOCAPS, 0xa7, 0x9B }, /* what is this for? */ + { '4', NOCAPS, '4', 0xE7 }, + { '5', NOCAPS, '5', '%' }, + { '9', NOCAPS, '9', ')' }, + { '0', NOCAPS, '0', '=' }, + + /* First letter row */ + { 'W', CAPS, 'w', 'W' }, + { 'R', CAPS, 'r', 'R' }, + { 'T', CAPS, 't', 'T' }, + { 'Z', CAPS, 'z', 'Z' }, + { 'U', CAPS, 'u', 'U' }, + { 'I', CAPS, 'i', 'I' }, + { 'O', CAPS, 'o', 'O' }, + { 'P', CAPS, 'p', 'P' }, + /* Second letter row */ + { 'A', CAPS, 'a', 'A' }, + { 'S', CAPS, 's', 'S' }, + { 'D', CAPS, 'd', 'D' }, + { 'F', CAPS, 'f', 'F' }, + { 'G', CAPS, 'g', 'G' }, + { 'H', CAPS, 'h', 'H' }, + { 'J', CAPS, 'j', 'J' }, + { 'K', CAPS, 'k', 'K' }, + { 'L', CAPS, 'l', 'L' }, + /* Third letter row */ + { 'Y', CAPS, 'y', 'Y' }, + { 'X', CAPS, 'x', 'X' }, + { 'V', CAPS, 'v', 'V' }, + { 'B', CAPS, 'b', 'B' }, + { 'N', CAPS, 'n', 'N' }, + + /* Specials */ + { VK_OEM_COMMA, NOCAPS, ',', ';' }, + { VK_OEM_PERIOD, NOCAPS, '.', ':' }, + { VK_OEM_MINUS, NOCAPS, '-', '_' }, + { VK_DECIMAL, NOCAPS, '.', '.' }, + { VK_TAB, NOCAPS, '\t', '\t' }, + { VK_ADD, NOCAPS, '+', '+' }, + { VK_DIVIDE, NOCAPS, 0x2f, 0x2f }, /* '/' */ + { VK_MULTIPLY, NOCAPS, '*', '*' }, + { VK_SUBTRACT, NOCAPS, '-', '-' }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = { + /* Normal, Shifted, Alt Gr */ + /* Legacy (telnet-style) ascii escapes */ + { VK_OEM_4, NOCAPS, '\'' , '?' , WCH_DEAD }, /* ' ? ? */ + { 0xff, NOCAPS, WCH_NONE, WCH_NONE, 0xb4 }, + { 'Q', CAPS, 'q', 'Q', '@' }, + { 'C', CAPS, 'c', 'C', 0xa9}, /* c C Copyright-Sign */ + { 'E', CAPS, 'e', 'E', 0x20ac }, /* e E Ç */ + { 'M', CAPS, 'm', 'M', 0xb5 }, /* m M mu-Sign */ + { VK_OEM_102, NOCAPS, '<', '>', '\\' }, + { 0,0 } +}; + +ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = { + /* Normal, Shifted, Alt Gr, C-S-x */ + /* Legacy Ascii generators */ + { VK_BACK, NOCAPS, '\b', '\b', WCH_NONE, 0x7f }, + { VK_ESCAPE, NOCAPS, 0x1b, 0x1b, WCH_NONE, 0x1b }, + { VK_RETURN, NOCAPS, '\r', '\r', WCH_NONE, '\n' }, + { VK_SPACE, NOCAPS, ' ', ' ', WCH_NONE, ' ' }, + { VK_CANCEL, NOCAPS, 0x03, 0x03, WCH_NONE, 0x03 }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = { + /* Normal, Shifted, Alt Gr, Ctrl */ + { '1', NOCAPS, '1', '+', '|', WCH_NONE, 0x00 }, + { '2', NOCAPS, '2', '\"', '@', WCH_NONE, 0x00 }, + { '3', NOCAPS, '3', '*', '#', WCH_NONE, 0x00 }, + { '6', NOCAPS, '6', '&', 0xac, WCH_NONE, 0x00 }, + { '7', NOCAPS, '7', '/', 0xa6, WCH_NONE, 0x00 }, + { '8', NOCAPS, '8', '(', 0xa2, WCH_NONE, 0x00 }, + { VK_OEM_1, KCTRL, 0xfc, 0xe8, 0x5b, 0Xdc, 0xc8 }, /* ³ Þ [ ? ? */ + { VK_OEM_2, NOCAPS, 0x24, 0xa3, 0x7d, WCH_NONE, 0x00 }, /* $ ú } */ + { VK_OEM_3, KCTRL, 0xf6, 0xe9, WCH_NONE, 0xd6, 0xc9 }, /* ÷ Ú Í ?*/ + { VK_OEM_6, NOCAPS, WCH_DEAD, WCH_DEAD, WCH_DEAD, WCH_NONE, 0x00 }, /* ^ ` ~ */ + { 0xff, NOCAPS, 0x5e , 0x27 , 0x7e , WCH_NONE, 0x00 }, + { VK_OEM_7, KCTRL, 0xe4, 0xe0, 0x7b, 0xc4, 0xc0 }, /* õ Ó { ? ? */ + { VK_OEM_PLUS, NOCAPS, WCH_DEAD, 0x21 , 0x5D , WCH_NONE, 0x00 }, /* ¿ ! ] */ + { 0xff, NOCAPS, 0xa8 , WCH_NONE, WCH_NONE, WCH_NONE, 0x00 }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS1 keypad_numbers[] = { + { VK_DECIMAL, 0, '.' }, /* I have no idea why this has to be like this. Shouldn't it be a "."? */ + { VK_NUMPAD0, 0, '0' }, + { VK_NUMPAD1, 0, '1' }, + { VK_NUMPAD2, 0, '2' }, + { VK_NUMPAD3, 0, '3' }, + { VK_NUMPAD4, 0, '4' }, + { VK_NUMPAD5, 0, '5' }, + { VK_NUMPAD6, 0, '6' }, + { VK_NUMPAD7, 0, '7' }, + { VK_NUMPAD8, 0, '8' }, + { VK_NUMPAD9, 0, '9' }, +// { VK_BACK, 0, '\010' }, + { 0,0 } +}; + +#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) } + +ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = { + vk_master(3,key_to_chars_3mod), + vk_master(4,key_to_chars_4mod), + vk_master(5,key_to_chars_5mod), + vk_master(2,key_to_chars_2mod), + vk_master(1,keypad_numbers), + { 0,0,0 } +}; + +ROSDATA VSC_LPWSTR key_names[] = { + { 0x00, L"" }, + { 0x01, L"Esc" }, + { 0x0e, L"R\x00fc" L"ck" }, + { 0x0f, L"Tabulator" }, + { 0x1c, L"Eingabe" }, + { 0x1d, L"Ctrl" }, + { 0x2a, L"Umschalt Links" }, + { 0x36, L"Umschalt Rechts" }, + { 0x37, L" (Zehnertastatur)" }, + { 0x38, L"Alt" }, + { 0x39, L"Leer" }, + { 0x3a, L"Caps Lock" }, + { 0x3b, L"F1" }, + { 0x3c, L"F2" }, + { 0x3d, L"F3" }, + { 0x3e, L"F4" }, + { 0x3f, L"F5" }, + { 0x40, L"F6" }, + { 0x41, L"F7" }, + { 0x42, L"F8" }, + { 0x43, L"F9" }, + { 0x44, L"F10" }, + { 0x45, L"Pause" }, + { 0x46, L"Rollen-Feststell" }, + { 0x47, L"7 (Zehnertastatur)" }, + { 0x48, L"8 (Zehnertastatur)" }, + { 0x49, L"9 (Zehnertastatur)" }, + { 0x4a, L"- (Zehnertastatur)" }, + { 0x4b, L"4 (Zehnertastatur)" }, + { 0x4c, L"5 (Zehnertastatur)" }, + { 0x4d, L"6 (Zehnertastatur)" }, + { 0x4e, L"+ (Zehnertastatur)" }, + { 0x4f, L"1 (Zehnertastatur)" }, + { 0x50, L"2 (Zehnertastatur)" }, + { 0x51, L"3 (Zehnertastatur)" }, + { 0x52, L"0 (Zehnertastatur)" }, + { 0x53, L"Punkt (Zehnertastatur)" }, + { 0x54, L"Sys Req" }, + { 0x57, L"F11" }, + { 0x58, L"F12" }, + { 0x7c, L"F13" }, + { 0x7d, L"F14" }, + { 0x7e, L"F15" }, + { 0x7f, L"F16" }, + { 0x80, L"F17" }, + { 0x81, L"F18" }, + { 0x82, L"F19" }, + { 0x83, L"F20" }, + { 0x84, L"F21" }, + { 0x85, L"F22" }, + { 0x86, L"F23" }, + { 0x87, L"F24" }, + { 0, NULL }, +}; + +ROSDATA VSC_LPWSTR extended_key_names[] = { + { 0x1c, L"Eingabe (Zehnertastatur" }, + { 0x1d, L"Strg-Rechts" }, + { 0x35, L" (Zehnertastatur)" }, + { 0x37, L"Druck" }, + { 0x38, L"Alt Gr" }, + { 0x45, L"Num-Feststell" }, + { 0x46, L"Untbr" }, + { 0x47, L"Pos1" }, + { 0x48, L"Nach-Oben" }, + { 0x49, L"Bild-Nach-Oben" }, + { 0x4b, L"Nach-Links" }, +//{ 0x4c, L"Center" }, + { 0x4d, L"Nach-Rechts" }, + { 0x4f, L"Ende" }, + { 0x50, L"Nach-Unten" }, + { 0x51, L"Bild-Nach-Unten" }, + { 0x52, L"Einfg" }, + { 0x53, L"Entf" }, + { 0x54, L"<ReactOS>" }, + { 0x55, L"Hilfe" }, + { 0x56, L"Linke <ReactOS>" }, + { 0x5b, L"Rechte <ReactOS>" }, + { 0, NULL }, +}; + +ROSDATA DEADKEY_LPWSTR dead_key_names[] = { + L"\x00b4" L"Akut", + L"`" L"Gravis", + L"^" L"Zirkumflex", + NULL +}; + +#define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags + +ROSDATA DEADKEY dead_key[] = { + { DEADTRANS(L'a', L'^', 0xe2, 0x00) },/* ^ */ + { DEADTRANS(L'e', L'^', 0xea, 0x00) }, + { DEADTRANS(L'i', L'^', 0xee, 0x00) }, + { DEADTRANS(L'o', L'^', 0xf4, 0x00) }, + { DEADTRANS(L'u', L'^', 0xfb, 0x00) }, + { DEADTRANS(L'A', L'^', 0xc2, 0x00) }, + { DEADTRANS(L'E', L'^', 0xca, 0x00) }, + { DEADTRANS(L'I', L'^', 0xce, 0x00) }, + { DEADTRANS(L'O', L'^', 0xd4, 0x00) }, + { DEADTRANS(L'U', L'^', 0xdb, 0x00) }, + { DEADTRANS(L' ', L'^', L'^', 0x00) }, + { DEADTRANS(L'a', 0xb4, 0xe1, 0x00) }, /* ? */ + { DEADTRANS(L'e', 0xb4, 0xe9, 0x00) }, + { DEADTRANS(L'i', 0xb4, 0xed, 0x00) }, + { DEADTRANS(L'o', 0xb4, 0xf3, 0x00) }, + { DEADTRANS(L'u', 0xb4, 0xfa, 0x00) }, + { DEADTRANS(L'y', 0xb4, 0xfd, 0x00) }, + { DEADTRANS(L'A', 0xb4, 0xc1, 0x00) }, + { DEADTRANS(L'E', 0xb4, 0xc9, 0x00) }, + { DEADTRANS(L'I', 0xb4, 0xcd, 0x00) }, + { DEADTRANS(L'O', 0xb4, 0xd3, 0x00) }, + { DEADTRANS(L'U', 0xb4, 0xda, 0x00) }, + { DEADTRANS(L'Y', 0xb4, 0xdd, 0x00) }, + { DEADTRANS(L' ', 0xb4, 0xb4, 0x00) }, + { DEADTRANS(L'a', L'`', 0xe0, 0x00) }, /* ` */ + { DEADTRANS(L'e', L'`', 0xe8, 0x00) }, + { DEADTRANS(L'i', L'`', 0xec, 0x00) }, + { DEADTRANS(L'o', L'`', 0xf2, 0x00) }, + { DEADTRANS(L'u', L'`', 0xf9, 0x00) }, + { DEADTRANS(L'A', L'`', 0xc0, 0x00) }, + { DEADTRANS(L'E', L'`', 0xc8, 0x00) }, + { DEADTRANS(L'I', L'`', 0xcc, 0x00) }, + { DEADTRANS(L'O', L'`', 0xd2, 0x00) }, + { DEADTRANS(L'U', L'`', 0xd9, 0x00) }, + { DEADTRANS(L' ', L'`', L'`', 0x00) }, + { DEADTRANS(L' ', 0xa8, 0xa8, 0x00) }, /* ¿ */ + { DEADTRANS(L'a', 0xa8, 0xe4, 0x00) }, + { DEADTRANS(L'e', 0xa8, 0xeb, 0x00) }, + { DEADTRANS(L'i', 0xa8, 0xef, 0x00) }, + { DEADTRANS(L'o', 0xa8, 0xf6, 0x00) }, + { DEADTRANS(L'u', 0xa8, 0xfc, 0x00) }, + { DEADTRANS(L'y', 0xa8, 0xff, 0x00) }, + { DEADTRANS(L'A', 0xa8, 0xc4, 0x00) }, + { DEADTRANS(L'E', 0xa8, 0xcb, 0x00) }, + { DEADTRANS(L'I', 0xa8, 0xcf, 0x00) }, + { DEADTRANS(L'O', 0xa8, 0xd6, 0x00) }, + { DEADTRANS(L'U', 0xa8, 0xdc, 0x00) }, + { DEADTRANS(L' ', 0x7e, 0x7e, 0x00) }, /* ~ */ + { DEADTRANS(L'a', 0x7e, 0xe3, 0x00) }, + { DEADTRANS(L'o', 0x7e, 0xf5, 0x00) }, + { DEADTRANS(L'n', 0x7e, 0xf1, 0x00) }, + { DEADTRANS(L'A', 0x7e, 0xc3, 0x00) }, + { DEADTRANS(L'O', 0x7e, 0xd5, 0x00) }, + { DEADTRANS(L'N', 0x7e, 0xd1, 0x00) }, + { 0, 0 } +}; + +/* Finally, the master table */ +ROSDATA KBDTABLES keyboard_layout_table = { + /* modifier assignments */ + (PMODIFIERS)&modifier_bits, + + /* character from vk tables */ + vk_to_wchar_master_table, + + /* diacritical marks -- currently implemented by wine code */ + dead_key, + + /* Key names */ + (VSC_LPWSTR *)key_names, + (VSC_LPWSTR *)extended_key_names, + dead_key_names, /* Dead key names */ + + /* scan code to virtual key maps */ + scancode_to_vk, + sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + extcode0_to_vk, + extcode1_to_vk, + + MAKELONG(1,1), /* Version 1.0 */ + + /* Ligatures -- German doesn't have any */ + 0, + 0, + NULL +}; + +PKBDTABLES STDCALL KbdLayerDescriptor() { + return &keyboard_layout_table; +} + Property changes on: trunk/reactos/lib/kbdsg/kbdsg.c ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/kbdsg/kbdsg.def --- trunk/reactos/lib/kbdsg/kbdsg.def 2005-04-18 05:47:13 UTC (rev 14667) +++ trunk/reactos/lib/kbdsg/kbdsg.def 2005-04-18 13:27:16 UTC (rev 14668) @@ -0,0 +1,8 @@ +; +; ReactOS Operating System +; +LIBRARY kbdsg.dll + +EXPORTS +KbdLayerDescriptor@0 +;EOF Property changes on: trunk/reactos/lib/kbdsg/kbdsg.def ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/kbdsg/kbdsg.rc --- trunk/reactos/lib/kbdsg/kbdsg.rc 2005-04-18 05:47:13 UTC (rev 14667) +++ trunk/reactos/lib/kbdsg/kbdsg.rc 2005-04-18 13:27:16 UTC (rev 14668) @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS German (Switzerland) Keyboard Layout\0" +#define REACTOS_STR_INTERNAL_NAME "kbdsg\0" +#define REACTOS_STR_ORIGINAL_FILENAME "kbdsg.dll\0" +#include <reactos/version.rc> Property changes on: trunk/reactos/lib/kbdsg/kbdsg.rc ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/kbdsg/makefile --- trunk/reactos/lib/kbdsg/makefile 2005-04-18 05:47:13 UTC (rev 14667) +++ trunk/reactos/lib/kbdsg/makefile 2005-04-18 13:27:16 UTC (rev 14668) @@ -0,0 +1,41 @@ +# $Id$ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = dynlink + +TARGET_NAME = kbdsg + +TARGET_BASE = 0x5500000 + +TARGET_ENTRY = 0x00000000 + +TARGET_CFLAGS = -I$(PATH_TO_TOP)/ntoskrnl/include + +# require os code to explicitly request A/W version of structs/functions +TARGET_CFLAGS += -D_DISABLE_TIDENTS + +TARGET_LFLAGS = -nostartfiles -nostdlib + +TARGET_SDKLIBS = + +TARGET_GCCLIBS = gcc + +TARGET_PCH = + +TARGET_CLEAN = + +TARGET_OBJECTS = kbdsg.o + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +include $(TOOLS_PATH)/depend.mk + +%/TAGS: + etags -o $(@D)/TAGS $((a)D)/\*.c + +etags: ./TAGS Property changes on: trunk/reactos/lib/kbdsg/makefile ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native
19 years, 8 months
1
0
0
0
[ion] 14667: Implement PsGetVersion. OSR and other sources say that the build number is a mix of high and low word, where the high represents checked or free
by ion@svn.reactos.com
Implement PsGetVersion. OSR and other sources say that the build number is a mix of high and low word, where the high represents checked or free Modified: trunk/reactos/ntoskrnl/ps/psmgr.c _____ Modified: trunk/reactos/ntoskrnl/ps/psmgr.c --- trunk/reactos/ntoskrnl/ps/psmgr.c 2005-04-18 05:25:07 UTC (rev 14666) +++ trunk/reactos/ntoskrnl/ps/psmgr.c 2005-04-18 05:47:13 UTC (rev 14667) @@ -34,7 +34,11 @@ THREAD_ALL_ACCESS}; BOOLEAN DoneInitYet = FALSE; - + +extern ULONG NtBuildNumber; +extern ULONG NtMajorVersion; +extern ULONG NtMinorVersion; + VOID INIT_FUNCTION PsInitClientIDManagment(VOID); @@ -309,44 +313,39 @@ * FALSE OS is a free build. * * NOTES - * The DDK docs say something about a 'CmCSDVersionString'. - * How do we determine in the build is checked or free?? * - * @unimplemented + * @implemented */ - BOOLEAN STDCALL -PsGetVersion ( - PULONG MajorVersion OPTIONAL, - PULONG MinorVersion OPTIONAL, - PULONG BuildNumber OPTIONAL, - PUNICODE_STRING CSDVersion OPTIONAL - ) +PsGetVersion(PULONG MajorVersion OPTIONAL, + PULONG MinorVersion OPTIONAL, + PULONG BuildNumber OPTIONAL, + PUNICODE_STRING CSDVersion OPTIONAL) { - if (MajorVersion) - *MajorVersion = 4; + if (MajorVersion) + *MajorVersion = NtMajorVersion; - if (MinorVersion) - *MinorVersion = 0; + if (MinorVersion) + *MinorVersion = NtMinorVersion; - if (BuildNumber) - *BuildNumber = 1381; + if (BuildNumber) + *BuildNumber = NtBuildNumber; - if (CSDVersion) - { - CSDVersion->Length = 0; - CSDVersion->MaximumLength = 0; - CSDVersion->Buffer = NULL; + if (CSDVersion) + { + CSDVersion->Length = 0; + CSDVersion->MaximumLength = 0; + CSDVersion->Buffer = NULL; #if 0 - CSDVersion->Length = CmCSDVersionString.Length; - CSDVersion->MaximumLength = CmCSDVersionString.Maximum; - CSDVersion->Buffer = CmCSDVersionString.Buffer; + CSDVersion->Length = CmCSDVersionString.Length; + CSDVersion->MaximumLength = CmCSDVersionString.Maximum; + CSDVersion->Buffer = CmCSDVersionString.Buffer; #endif - } + } - /* FIXME: How do we determine if build is checked or free? */ - return FALSE; + /* Check the High word */ + return (NtBuildNumber >> 28) == 0xC; } /* EOF */
19 years, 8 months
1
0
0
0
[ion] 14666: Fix Access Bug. cmd.exe and taskmgr work again, but there remains a bug with the process list
by ion@svn.reactos.com
Fix Access Bug. cmd.exe and taskmgr work again, but there remains a bug with the process list Modified: trunk/reactos/ntoskrnl/ke/process.c Modified: trunk/reactos/ntoskrnl/ps/kill.c Modified: trunk/reactos/ntoskrnl/ps/process.c _____ Modified: trunk/reactos/ntoskrnl/ke/process.c --- trunk/reactos/ntoskrnl/ke/process.c 2005-04-18 05:12:36 UTC (rev 14665) +++ trunk/reactos/ntoskrnl/ke/process.c 2005-04-18 05:25:07 UTC (rev 14666) @@ -70,7 +70,7 @@ KAFFINITY Affinity, LARGE_INTEGER DirectoryTableBase) { - DPRINT1("KeInitializeProcess. Process: %x, DirectoryTableBase: %x\n", Process, DirectoryTableBase); + DPRINT("KeInitializeProcess. Process: %x, DirectoryTableBase: %x\n", Process, DirectoryTableBase); /* Initialize the Dispatcher Header */ KeInitializeDispatcherHeader(&Process->DispatcherHeader, @@ -89,7 +89,7 @@ /* Initialize the Thread List */ InitializeListHead(&Process->ThreadListHead); - DPRINT1("The Process has now been initalized with the Kernel\n"); + DPRINT("The Process has now been initalized with the Kernel\n"); } ULONG _____ Modified: trunk/reactos/ntoskrnl/ps/kill.c --- trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 05:12:36 UTC (rev 14665) +++ trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 05:25:07 UTC (rev 14666) @@ -151,7 +151,7 @@ { PEPROCESS Process = (PEPROCESS)ObjectBody; - DPRINT1("PiDeleteProcess(ObjectBody %x)\n",Process); + DPRINT1("PiDeleteProcess(ObjectBody %x)\n",Process->UniqueProcessId); /* Delete the CID Handle */ if(Process->UniqueProcessId != NULL) { @@ -291,7 +291,7 @@ /* Free the TEB */ if((Teb = CurrentThread->Tcb.Teb)) { - DPRINT1("Decommit teb at %p\n", Teb); + DPRINT("Decommit teb at %p\n", Teb); MmDeleteTeb(CurrentProcess, Teb); CurrentThread->Tcb.Teb = NULL; } _____ Modified: trunk/reactos/ntoskrnl/ps/process.c --- trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 05:12:36 UTC (rev 14665) +++ trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 05:25:07 UTC (rev 14666) @@ -872,7 +872,7 @@ if (ClientId->UniqueThread) { /* Get the Process */ - DPRINT("Opening by Thread ID\n"); + DPRINT("Opening by Thread ID: %x\n", ClientId->UniqueThread); Status = PsLookupProcessThreadByCid(ClientId, &Process, &Thread); @@ -881,7 +881,7 @@ else { /* Get the Process */ - DPRINT("Opening by Process ID\n"); + DPRINT("Opening by Process ID: %x\n", ClientId->UniqueProcess); Status = PsLookupProcessByProcessId(ClientId->UniqueProcess, &Process); DPRINT("Found: %x\n", Process); @@ -897,7 +897,7 @@ Status = ObOpenObjectByPointer(Process, ObjectAttributes->Attributes, NULL, - 0, + DesiredAccess, PsProcessType, PreviousMode, ProcessHandle);
19 years, 8 months
1
0
0
0
[ion] 14665: Fix incorrect OpenProcess implementation in kernel32 and make it tidier. I'm now seeing a bug with Access rights...
by ion@svn.reactos.com
Fix incorrect OpenProcess implementation in kernel32 and make it tidier. I'm now seeing a bug with Access rights... Modified: trunk/reactos/lib/kernel32/process/proc.c _____ Modified: trunk/reactos/lib/kernel32/process/proc.c --- trunk/reactos/lib/kernel32/process/proc.c 2005-04-18 04:55:48 UTC (rev 14664) +++ trunk/reactos/lib/kernel32/process/proc.c 2005-04-18 05:12:36 UTC (rev 14665) @@ -342,19 +342,14 @@ CLIENT_ID ClientId; ClientId.UniqueProcess = (HANDLE)dwProcessId; - ClientId.UniqueThread = INVALID_HANDLE_VALUE; + ClientId.UniqueThread = 0; - ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES); - ObjectAttributes.RootDirectory = (HANDLE)NULL; - ObjectAttributes.SecurityDescriptor = NULL; - ObjectAttributes.SecurityQualityOfService = NULL; - ObjectAttributes.ObjectName = NULL; + InitializeObjectAttributes(&ObjectAttributes, + NULL, + (bInheritHandle ? OBJ_INHERIT : 0), + NULL, + NULL); - if (bInheritHandle == TRUE) - ObjectAttributes.Attributes = OBJ_INHERIT; - else - ObjectAttributes.Attributes = 0; - errCode = NtOpenProcess(&ProcessHandle, dwDesiredAccess, &ObjectAttributes,
19 years, 8 months
1
0
0
0
[ion] 14664: Fix Process not being deleted
by ion@svn.reactos.com
Fix Process not being deleted Modified: trunk/reactos/ntoskrnl/mm/mm.c Modified: trunk/reactos/ntoskrnl/ps/kill.c Modified: trunk/reactos/ntoskrnl/ps/process.c _____ Modified: trunk/reactos/ntoskrnl/mm/mm.c --- trunk/reactos/ntoskrnl/mm/mm.c 2005-04-18 04:46:06 UTC (rev 14663) +++ trunk/reactos/ntoskrnl/mm/mm.c 2005-04-18 04:55:48 UTC (rev 14664) @@ -90,6 +90,7 @@ return(STATUS_SUCCESS); case MEMORY_AREA_VIRTUAL_MEMORY: + case MEMORY_AREA_PEB_OR_TEB: MmFreeVirtualMemory(Process, Marea); break; _____ Modified: trunk/reactos/ntoskrnl/ps/kill.c --- trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 04:46:06 UTC (rev 14663) +++ trunk/reactos/ntoskrnl/ps/kill.c 2005-04-18 04:55:48 UTC (rev 14664) @@ -151,7 +151,7 @@ { PEPROCESS Process = (PEPROCESS)ObjectBody; - DPRINT("PiDeleteProcess(ObjectBody %x)\n",Process); + DPRINT1("PiDeleteProcess(ObjectBody %x)\n",Process); /* Delete the CID Handle */ if(Process->UniqueProcessId != NULL) { _____ Modified: trunk/reactos/ntoskrnl/ps/process.c --- trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 04:46:06 UTC (rev 14663) +++ trunk/reactos/ntoskrnl/ps/process.c 2005-04-18 04:55:48 UTC (rev 14664) @@ -427,9 +427,8 @@ /* FIXME: ObGetObjectSecurity(Process, &SecurityDescriptor) SeAccessCheck */ - ObReferenceObject(Process); - ObReferenceObject(Process); - return Status; + ObDereferenceObject(Process); + return Status; exitdereferenceobjects: if(SectionObject != NULL) ObDereferenceObject(SectionObject);
19 years, 8 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
48
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Results per page:
10
25
50
100
200