mirror of
https://github.com/reactos/reactos.git
synced 2025-04-06 05:34:22 +00:00
Misc. user fixes.
Don't load FPU or debug register data unless requested. svn path=/trunk/; revision=3515
This commit is contained in:
parent
8c69edcca7
commit
57e810c555
12 changed files with 94 additions and 64 deletions
|
@ -14,8 +14,6 @@ BOOL InitPointer(PPDEV ppdev)
|
|||
ppdev->PointerAttributes = sizeof(VIDEO_POINTER_ATTRIBUTES) +
|
||||
(CursorWidth * CursorHeight) * 2; // space for two cursors (data and mask); we assume 4bpp.. but use 8bpp for speed
|
||||
|
||||
ppdev->pPointerAttributes = EngAllocMem(0, 512, ALLOC_TAG);
|
||||
|
||||
// Allocate memory for pointer attributes
|
||||
ppdev->pPointerAttributes = EngAllocMem(0, ppdev->PointerAttributes, ALLOC_TAG);
|
||||
|
||||
|
|
|
@ -357,6 +357,7 @@ NtUserGetCaretPos 1
|
|||
NtUserGetClassInfo 5
|
||||
NtUserGetClassLong 2
|
||||
NtUserGetClassName 3
|
||||
NtUserGetClientOrigin 2
|
||||
NtUserGetClipboardData 2
|
||||
NtUserGetClipboardFormatName 3
|
||||
NtUserGetClipboardOwner 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rtl.h,v 1.67 2002/09/08 10:47:45 chorns Exp $
|
||||
/* $Id: rtl.h,v 1.68 2002/09/17 23:41:43 dwelch Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -723,12 +723,9 @@ RtlCreateUnicodeString (
|
|||
IN PWSTR Source
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
STDCALL
|
||||
RtlCreateUnicodeStringFromAsciiz (
|
||||
OUT PUNICODE_STRING Destination,
|
||||
IN PCSZ Source
|
||||
);
|
||||
BOOLEAN STDCALL
|
||||
RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
|
||||
IN PCSZ Source);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
|
|
|
@ -4203,6 +4203,9 @@ extern "C" {
|
|||
#define HTTRANSPARENT (-1)
|
||||
#define HTVSCROLL (7)
|
||||
#define HTZOOM (9)
|
||||
#define HTBORDER (18)
|
||||
#define HTMAXBUTTON HTZOOM
|
||||
#define HTMINBUTTON HTREDUCE
|
||||
|
||||
/* Mouse messages */
|
||||
#define MK_CONTROL (8)
|
||||
|
|
|
@ -859,6 +859,7 @@ extern "C" {
|
|||
|
||||
#endif /* UNICODE and ASCII defines */
|
||||
|
||||
HWND STDCALL GetAncestor(HWND hWnd, UINT GaFlags);
|
||||
WINBOOL STDCALL AbnormalTermination(VOID);
|
||||
int STDCALL AbortDoc(HDC);
|
||||
WINBOOL STDCALL AbortPath(HDC);
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
#ifndef __INCLUDE_USER32_WININTERNAL_H
|
||||
#define __INCLUDE_USER32_WININTERNAL_H
|
||||
|
||||
typedef struct _INTERNALPOS
|
||||
{
|
||||
RECT NormalRect;
|
||||
POINT IconPos;
|
||||
POINT MaxPos;
|
||||
HWND IconTitle;
|
||||
} INTERNALPOS, *PINTERNALPOS;
|
||||
|
||||
#define WIN_NCACTIVATED (0x0080)
|
||||
|
||||
/* internal DCX flags */
|
||||
|
@ -7,3 +18,5 @@
|
|||
#define DCX_WINDOWPAINT 0x00020000
|
||||
#define DCX_KEEPCLIPRGN 0x00040000
|
||||
#define DCX_NOCLIPCHILDREN 0x00080000
|
||||
|
||||
#endif /* __INCLUDE_USER32_WININTERNAL_H */
|
||||
|
|
|
@ -13,6 +13,8 @@ BOOL STDCALL
|
|||
NtUserGetWindowRect(HWND hWnd, LPRECT Rect);
|
||||
HANDLE STDCALL
|
||||
NtUserGetProp(HWND hWnd, ATOM Atom);
|
||||
BOOL STDCALL
|
||||
NtUserGetClientOrigin(HWND hWnd, LPPOINT Point);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
|
@ -338,8 +340,7 @@ NtUserDestroyWindow(HWND Wnd);
|
|||
|
||||
LRESULT
|
||||
STDCALL
|
||||
NtUserDispatchMessage(
|
||||
LPMSG lpmsg);
|
||||
NtUserDispatchMessage(CONST MSG* lpmsg);
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
|
@ -437,7 +438,7 @@ STDCALL
|
|||
NtUserEndMenu(VOID);
|
||||
|
||||
BOOL STDCALL
|
||||
NtUserEndPaint(HWND hWnd, PAINTSTRUCT* lPs);
|
||||
NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* lPs);
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
|
|
|
@ -44,14 +44,10 @@ TextOutW(
|
|||
return W32kTextOut(hDC, XStart, YStart, String, Count);
|
||||
}
|
||||
|
||||
COLORREF
|
||||
STDCALL
|
||||
SetTextColor(
|
||||
HDC hDC,
|
||||
COLORREF color
|
||||
)
|
||||
COLORREF STDCALL
|
||||
SetTextColor(HDC hDC, COLORREF color)
|
||||
{
|
||||
return W32kSetTextColor(hDC, color);
|
||||
return(W32kSetTextColor(hDC, color));
|
||||
}
|
||||
|
||||
BOOL
|
||||
|
@ -241,3 +237,4 @@ CreateFontW(
|
|||
return W32kCreateFont(Height, Width, Escapement, Orientation, Weight, Italic, Underline, StrikeOut,
|
||||
CharSet, OutputPrecision, ClipPrecision, Quality, PitchAndFamily, Face);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: unicode.c,v 1.22 2002/09/08 10:23:07 chorns Exp $
|
||||
/* $Id: unicode.c,v 1.23 2002/09/17 23:41:44 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -473,12 +473,9 @@ RtlCreateUnicodeString (
|
|||
}
|
||||
|
||||
|
||||
BOOLEAN
|
||||
STDCALL
|
||||
RtlCreateUnicodeStringFromAsciiz (
|
||||
OUT PUNICODE_STRING Destination,
|
||||
IN PCSZ Source
|
||||
)
|
||||
BOOLEAN STDCALL
|
||||
RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
|
||||
IN PCSZ Source)
|
||||
{
|
||||
ANSI_STRING AnsiString;
|
||||
NTSTATUS Status;
|
||||
|
|
|
@ -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: bthread.S,v 1.6 2002/09/15 13:49:57 guido Exp $
|
||||
/* $Id: bthread.S,v 1.7 2002/09/17 23:41:44 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -32,6 +32,15 @@
|
|||
#include <internal/ps.h>
|
||||
#include <ddk/defines.h>
|
||||
|
||||
/* Values for contextflags */
|
||||
#define CONTEXT_i386 0x10000
|
||||
#define CONTEXT_CONTROL (CONTEXT_i386 | 1)
|
||||
#define CONTEXT_INTEGER (CONTEXT_i386 | 2)
|
||||
#define CONTEXT_SEGMENTS (CONTEXT_i386 | 4)
|
||||
#define CONTEXT_FLOATING_POINT (CONTEXT_i386 | 8)
|
||||
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | 0x10)
|
||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS)
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
/*
|
||||
|
@ -52,25 +61,6 @@ _PsBeginThread:
|
|||
*/
|
||||
call _PiBeforeBeginThread
|
||||
|
||||
/*
|
||||
* Initialize debugging registers
|
||||
*/
|
||||
movl $0, %eax /* set to 0 */
|
||||
movl %eax, %dr0
|
||||
movl %eax, %dr1
|
||||
movl %eax, %dr2
|
||||
movl %eax, %dr3
|
||||
movl %eax, %dr6
|
||||
movl %eax, %dr7
|
||||
|
||||
/*
|
||||
* Initialize floating point registers
|
||||
*/
|
||||
movl (_HardwareMathSupport), %eax
|
||||
jz nofpu
|
||||
fninit
|
||||
nofpu:
|
||||
|
||||
/*
|
||||
* Call the actual start of the thread
|
||||
*/
|
||||
|
@ -112,9 +102,16 @@ _PsBeginThreadWithContextInternal:
|
|||
*/
|
||||
call _PiBeforeBeginThread
|
||||
|
||||
/*
|
||||
* Load the context flags.
|
||||
*/
|
||||
popl %ebx
|
||||
|
||||
/*
|
||||
* Load the debugging registers
|
||||
*/
|
||||
testl $CONTEXT_DEBUG_REGISTERS, %ebx
|
||||
jz .L1
|
||||
popl %eax /* Dr0 */
|
||||
movl %eax, %dr0
|
||||
popl %eax /* Dr1 */
|
||||
|
@ -127,15 +124,21 @@ _PsBeginThreadWithContextInternal:
|
|||
movl %eax, %dr6
|
||||
popl %eax /* Dr7 */
|
||||
movl %eax, %dr7
|
||||
|
||||
jmp .L3
|
||||
.L1:
|
||||
addl $24, %esp
|
||||
.L3:
|
||||
|
||||
/*
|
||||
* Load the floating point registers
|
||||
*/
|
||||
movl (_HardwareMathSupport), %eax
|
||||
jz nofpu2
|
||||
frstor 0(%esp)
|
||||
nofpu2:
|
||||
addl $4, %esp
|
||||
jz .L2
|
||||
testl $CONTEXT_FLOATING_POINT, %ebx
|
||||
jz .L2
|
||||
frstor (%esp)
|
||||
.L2:
|
||||
addl $112, %esp
|
||||
|
||||
/* Load the rest of the thread's user mode context. */
|
||||
movl $0, %eax
|
||||
|
|
|
@ -103,9 +103,9 @@ Ke386InitThreadWithContext(PKTHREAD Thread, PCONTEXT Context)
|
|||
/*
|
||||
* Setup a stack frame for exit from the task switching routine
|
||||
*/
|
||||
|
||||
InitSize = 5 * sizeof(DWORD) + 6 * sizeof(DWORD) + sizeof(DWORD) +
|
||||
sizeof(KTRAP_FRAME);
|
||||
|
||||
InitSize = 5 * sizeof(DWORD) + sizeof(DWORD) + 6 * sizeof(DWORD) +
|
||||
sizeof(FLOATING_SAVE_AREA) + sizeof(KTRAP_FRAME);
|
||||
KernelStack = (PULONG)(Thread->KernelStack - InitSize);
|
||||
|
||||
/* Set up the initial frame for the return from the dispatcher. */
|
||||
|
@ -115,19 +115,24 @@ Ke386InitThreadWithContext(PKTHREAD Thread, PCONTEXT Context)
|
|||
KernelStack[3] = 0; /* EBP */
|
||||
KernelStack[4] = (ULONG)PsBeginThreadWithContextInternal; /* EIP */
|
||||
|
||||
/* Save the context flags. */
|
||||
KernelStack[5] = Context->ContextFlags;
|
||||
|
||||
/* Set up the initial values of the debugging registers. */
|
||||
KernelStack[5] = Context->Dr0;
|
||||
KernelStack[6] = Context->Dr1;
|
||||
KernelStack[7] = Context->Dr2;
|
||||
KernelStack[8] = Context->Dr3;
|
||||
KernelStack[9] = Context->Dr6;
|
||||
KernelStack[10] = Context->Dr7;
|
||||
KernelStack[6] = Context->Dr0;
|
||||
KernelStack[7] = Context->Dr1;
|
||||
KernelStack[8] = Context->Dr2;
|
||||
KernelStack[9] = Context->Dr3;
|
||||
KernelStack[10] = Context->Dr6;
|
||||
KernelStack[11] = Context->Dr7;
|
||||
|
||||
/* Set up the initial floating point state. */
|
||||
KernelStack[11] = (ULONG)&Context->FloatSave;
|
||||
memcpy((PVOID)&KernelStack[12], (PVOID)&Context->FloatSave,
|
||||
sizeof(FLOATING_SAVE_AREA));
|
||||
|
||||
/* Set up a trap frame from the context. */
|
||||
TrapFrame = (PKTRAP_FRAME)((PBYTE)KernelStack + 12 * sizeof(DWORD));
|
||||
TrapFrame = (PKTRAP_FRAME)
|
||||
((PVOID)KernelStack + 12 * sizeof(DWORD) + sizeof(FLOATING_SAVE_AREA));
|
||||
TrapFrame->DebugEbp = (PVOID)Context->Ebp;
|
||||
TrapFrame->DebugEip = (PVOID)Context->Eip;
|
||||
TrapFrame->DebugArgMark = 0;
|
||||
|
@ -161,8 +166,8 @@ Ke386InitThreadWithContext(PKTHREAD Thread, PCONTEXT Context)
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
Ke386InitThread(PKTHREAD Thread,
|
||||
PKSTART_ROUTINE StartRoutine,
|
||||
Ke386InitThread(PKTHREAD Thread,
|
||||
PKSTART_ROUTINE StartRoutine,
|
||||
PVOID StartContext)
|
||||
/*
|
||||
* Initialize a thread
|
||||
|
|
|
@ -241,6 +241,20 @@ REGEDIT4
|
|||
"Start"=dword:00000001
|
||||
"Type"=dword:00000001
|
||||
|
||||
[\Registry\Machine\SYSTEM\ControlSet001\Services\Mouse]
|
||||
"ErrorControl"=dword:00000000
|
||||
"Group"="Pointer Class"
|
||||
"ImagePath"=expand:"system32\drivers\mouclass.sys"
|
||||
"Start"=dword:00000001
|
||||
"Type"=dword:00000001
|
||||
|
||||
[\Registry\Machine\SYSTEM\ControlSet001\Services\Psaux]
|
||||
"ErrorControl"=dword:00000000
|
||||
"Group"="Pointer Port"
|
||||
"ImagePath"=expand:"system32\drivers\psaux.sys"
|
||||
"Start"=dword:00000001
|
||||
"Type"=dword:00000001
|
||||
|
||||
[\Registry\Machine\SYSTEM\ControlSet002]
|
||||
|
||||
[\Registry\Machine\SYSTEM\Select]
|
||||
|
|
Loading…
Reference in a new issue