mirror of
https://github.com/reactos/reactos.git
synced 2025-05-08 03:07:05 +00:00
[WIN32K] On init, start by initializing NtUser stuff
Allocate gpsi (Global Server Info) after initializing & grabbing Userlock
This commit is contained in:
parent
be6a6b806a
commit
515d83a883
2 changed files with 17 additions and 11 deletions
|
@ -968,16 +968,7 @@ DriverEntry(
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate global server info structure */
|
NT_ROF(InitUserImpl());
|
||||||
gpsi = UserHeapAlloc(sizeof(*gpsi));
|
|
||||||
if (!gpsi)
|
|
||||||
{
|
|
||||||
DPRINT1("Failed allocate server info structure!\n");
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
|
||||||
}
|
|
||||||
|
|
||||||
RtlZeroMemory(gpsi, sizeof(*gpsi));
|
|
||||||
DPRINT("Global Server Data -> %p\n", gpsi);
|
|
||||||
|
|
||||||
NT_ROF(InitGdiHandleTable());
|
NT_ROF(InitGdiHandleTable());
|
||||||
NT_ROF(InitPaletteImpl());
|
NT_ROF(InitPaletteImpl());
|
||||||
|
@ -992,7 +983,6 @@ DriverEntry(
|
||||||
NT_ROF(InitLDEVImpl());
|
NT_ROF(InitLDEVImpl());
|
||||||
NT_ROF(InitDeviceImpl());
|
NT_ROF(InitDeviceImpl());
|
||||||
NT_ROF(InitDcImpl());
|
NT_ROF(InitDcImpl());
|
||||||
NT_ROF(InitUserImpl());
|
|
||||||
NT_ROF(InitWindowStationImpl());
|
NT_ROF(InitWindowStationImpl());
|
||||||
NT_ROF(InitDesktopImpl());
|
NT_ROF(InitDesktopImpl());
|
||||||
NT_ROF(InitInputImpl());
|
NT_ROF(InitInputImpl());
|
||||||
|
|
|
@ -81,6 +81,20 @@ InitUserImpl(VOID)
|
||||||
|
|
||||||
ExInitializeResourceLite(&UserLock);
|
ExInitializeResourceLite(&UserLock);
|
||||||
|
|
||||||
|
/* Hold global resource to make sanity checks happy. */
|
||||||
|
UserEnterExclusive();
|
||||||
|
|
||||||
|
/* Allocate global server info structure */
|
||||||
|
gpsi = UserHeapAlloc(sizeof(*gpsi));
|
||||||
|
if (!gpsi)
|
||||||
|
{
|
||||||
|
ERR("Failed allocate server info structure!\n");
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
RtlZeroMemory(gpsi, sizeof(*gpsi));
|
||||||
|
TRACE("Global Server Data -> %p\n", gpsi);
|
||||||
|
|
||||||
if (!UserCreateHandleTable())
|
if (!UserCreateHandleTable())
|
||||||
{
|
{
|
||||||
ERR("Failed creating handle table\n");
|
ERR("Failed creating handle table\n");
|
||||||
|
@ -108,6 +122,8 @@ InitUserImpl(VOID)
|
||||||
|
|
||||||
InitSysParams();
|
InitSysParams();
|
||||||
|
|
||||||
|
UserLeave();
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue