2002-08-26 David Welch <welch@computer2.darkstar.org>

* lib/gdi32/misc/dllmain.c (GdiDllInitialize): Don't initialize
	win32k.sys for each process.
	* subsys/csrss/init.c (CsrServerInitialization): Initialize
	win32k.sys as well.

2002-08-26  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ps/process.c (NtCreateProcess): Reference the
	parent process's handle using ExGetPreviousMode.

2002-08-26  David Welch  <welch@computer2.darkstar.org>

	* lib/user32/misc/dllmain.c (Init): Initialize gdi32 as well.

2002-08-26  David Welch  <welch@computer2.darkstar.org>

	* iface/addsys/genw32k.c (main, process): Generate a set of
	stubs for csrss as well.

svn path=/trunk/; revision=3396
This commit is contained in:
David Welch 2002-08-26 13:06:03 +00:00
parent f7c5c8bcd2
commit 024738024e
9 changed files with 81 additions and 32 deletions

View file

@ -1,3 +1,29 @@
2002-08-26 David Welch <welch@computer2.darkstar.org>
* lib/gdi32/misc/dllmain.c (GdiDllInitialize): Don't initialize
win32k.sys for each process.
* subsys/csrss/init.c (CsrServerInitialization): Initialize
win32k.sys as well.
2002-08-26 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ps/process.c (NtCreateProcess): Reference the
parent process's handle using ExGetPreviousMode.
2002-08-26 David Welch <welch@computer2.darkstar.org>
* lib/user32/misc/dllmain.c (Init): Initialize gdi32 as well.
2002-08-26 David Welch <welch@computer2.darkstar.org>
* iface/addsys/genw32k.c (main, process): Generate a set of
stubs for csrss as well.
2002-08-26 David Welch <welch@computer2.darkstar.org>
* lib/kernel32/process/create.c (CreateProcessW): Initialize
all the members of the new process's PPB.
2002-08-17 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/rmap.c (MmWritePagePhysicalAddress): Ensure the

View file

@ -1,4 +1,4 @@
/* $Id: genw32k.c,v 1.2 2002/07/04 19:56:33 dwelch Exp $
/* $Id: genw32k.c,v 1.3 2002/08/26 13:06:02 dwelch Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS version of ntdll
@ -172,7 +172,8 @@ int
process(
FILE * in,
FILE * out1,
FILE * out2
FILE * out2,
FILE * out3
)
{
char line [INPUT_BUFFER_SIZE];
@ -194,6 +195,13 @@ process(
*/
fprintf(out2,"// Machine generated, don't edit\n");
fprintf(out2,"\n\n");
/*
* CSRSS stubs file header
*/
fprintf(out3,"// Machine generated, don't edit\n");
fprintf(out3,"\n\n");
/*
* Scan the database. DB is a text file; each line
* is a record, which contains data for one system
@ -274,6 +282,21 @@ process(
fprintf(out2,"\t\"int\t$0x2E\\n\\t\"\n");
fprintf(out2,"\t\"ret\t$%d\\n\\t\");\n\n",stacksize);
/*
* Write the CSRSS stub for the current system call
*/
#ifdef PARAMETERIZED_LIBS
fprintf(out3,"__asm__(\"\\n\\t.global _%s@%d\\n\\t\"\n",name,stacksize);
fprintf(out3,"\"_%s@%d:\\n\\t\"\n",name,stacksize);
#else
fprintf(out3,"__asm__(\"\\n\\t.global _%s\\n\\t\"\n",name);
fprintf(out3,"\"_%s:\\n\\t\"\n",name);
#endif
fprintf(out3,"\t\"mov\t$%d,%%eax\\n\\t\"\n",sys_call_idx | INDEX);
fprintf(out3,"\t\"lea\t4(%%esp),%%edx\\n\\t\"\n");
fprintf(out3,"\t\"int\t$0x2E\\n\\t\"\n");
fprintf(out3,"\t\"ret\t$%d\\n\\t\");\n\n",stacksize);
/* Next system call index */
sys_call_idx++;
}
@ -299,9 +322,10 @@ int main(int argc, char* argv[])
FILE * out1; /* SERVICE_TABLE */
FILE * out2; /* GDI32 stubs */
FILE * out3; /* USER32 stubs */
FILE * out4; /* CSRSS stubs */
int ret;
if (argc != 5)
if (argc != 6)
{
usage(argv[0]);
return(1);
@ -335,7 +359,14 @@ int main(int argc, char* argv[])
return(1);
}
ret = process(in,out2,out3);
out4 = fopen(argv[5],"wb");
if (out4 == NULL)
{
perror("Failed to open output file (CSRSS stubs)");
return(1);
}
ret = process(in,out2,out3,out4);
rewind(in);
ret = makeSystemServiceTable(in, out1);

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.10 2001/07/15 21:18:54 rex Exp $
# $Id: makefile,v 1.11 2002/08/26 13:06:02 dwelch Exp $
#
# ReactOS Operating System
#
@ -17,6 +17,7 @@ SVC_MASK=0x1000
SVC_SERVICE_TABLE=../../subsys/win32k/main/svctab.c
SVC_GDI_STUBS=../../lib/gdi32/misc/win32k.c
SVC_USER_STUBS=../../lib/user32/misc/win32k.c
SVC_CSRSS_STUBS=../../subsys/csrss/win32k.c
SVC_FILES = $(SVC_GDI_STUBS) $(SVC_USER_STUBS) $(SVC_SERVICE_TABLE)
@ -33,19 +34,13 @@ $(TARGETNAME)$(EXE_POSTFIX): $(TARGETNAME).c
-O2 \
$(TARGETNAME).c
#$(SVC_FILES): $(SVC_DB) $(TARGETNAME)$(EXE_POSTFIX)
# ./$(TARGETNAME)$(EXE_POSTFIX) \
# $(SVC_DB) \
# $(SVC_MASK) \
# $(SVC_CLIENT_STUBS) \
# $(SVC_SERVICE_TABLE)
$(SVC_FILES): $(SVC_DB) $(TARGETNAME)$(EXE_POSTFIX)
./$(TARGETNAME)$(EXE_POSTFIX) \
$(SVC_DB) \
$(SVC_SERVICE_TABLE) \
$(SVC_GDI_STUBS) \
$(SVC_USER_STUBS)
$(SVC_USER_STUBS) \
$(SVC_CSRSS_STUBS)
clean:

View file

@ -1,9 +1,9 @@
/*
* dllmain.c
*
* $Revision: 1.3 $
* $Author: ekohl $
* $Date: 2000/02/22 20:55:36 $
* $Revision: 1.4 $
* $Author: dwelch $
* $Date: 2002/08/26 13:06:03 $
*
*/
@ -37,8 +37,6 @@ GdiDllInitialize (
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
if (W32kInitialize () == FALSE)
return FALSE;
GdiProcessSetup ();
break;

View file

@ -62,12 +62,9 @@ Init(VOID)
NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_SENDGETMINMAXINFO] =
(PVOID)User32SendGETMINMAXINFOMessageForKernel;
//ProcessWindowStation = CreateWindowStationW(L"WinStaName",0,GENERIC_ALL,NULL);
//Desktop = CreateDesktopA(NULL,NULL,NULL,0,0,NULL);
GdiDllInitialize(NULL, DLL_PROCESS_ATTACH, NULL);
//GdiDllInitialize(NULL, DLL_PROCESS_ATTACH, NULL);
return Status;
return(Status);
}
DWORD
@ -75,11 +72,9 @@ Cleanup(VOID)
{
DWORD Status;
//CloseWindowStation(ProcessWindowStation);
GdiDllInitialize(NULL, DLL_PROCESS_DETACH, NULL);
//GdiDllInitialize(NULL, DLL_PROCESS_DETACH, NULL);
return Status;
return(Status);
}
INT STDCALL

View file

@ -1,4 +1,4 @@
/* $Id: process.c,v 1.89 2002/08/20 20:37:14 hyperion Exp $
/* $Id: process.c,v 1.90 2002/08/26 13:06:03 dwelch Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -452,7 +452,7 @@ NtCreateProcess(OUT PHANDLE ProcessHandle,
Status = ObReferenceObjectByHandle(ParentProcessHandle,
PROCESS_CREATE_PROCESS,
PsProcessType,
UserMode,
ExGetPreviousMode(),
(PVOID*)&ParentProcess,
NULL);
if (!NT_SUCCESS(Status))

View file

@ -4,3 +4,4 @@ csrss.nostrip.exe
*.d
*.o
*.sym
win32k.c

View file

@ -1,4 +1,4 @@
/* $Id: init.c,v 1.14 2002/08/20 20:37:17 hyperion Exp $
/* $Id: init.c,v 1.15 2002/08/26 13:06:03 dwelch Exp $
*
* reactos/subsys/csrss/init.c
*
@ -203,6 +203,8 @@ CsrServerInitialization (
InitializeVideoAddressSpace();
W32kInitialize();
return TRUE;
}

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.15 2001/08/21 20:13:16 chorns Exp $
# $Id: makefile,v 1.16 2002/08/26 13:06:03 dwelch Exp $
PATH_TO_TOP = ../..
@ -22,7 +22,8 @@ OBJECTS_MISC = \
$(TARGET_NAME).o \
init.o \
print.o \
video.o
video.o \
win32k.o
TARGET_OBJECTS = \
$(OBJECTS_API) \