mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +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;
|
||||
}
|
||||
|
||||
/* Allocate global server info structure */
|
||||
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(InitUserImpl());
|
||||
|
||||
NT_ROF(InitGdiHandleTable());
|
||||
NT_ROF(InitPaletteImpl());
|
||||
|
@ -992,7 +983,6 @@ DriverEntry(
|
|||
NT_ROF(InitLDEVImpl());
|
||||
NT_ROF(InitDeviceImpl());
|
||||
NT_ROF(InitDcImpl());
|
||||
NT_ROF(InitUserImpl());
|
||||
NT_ROF(InitWindowStationImpl());
|
||||
NT_ROF(InitDesktopImpl());
|
||||
NT_ROF(InitInputImpl());
|
||||
|
|
|
@ -81,6 +81,20 @@ InitUserImpl(VOID)
|
|||
|
||||
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())
|
||||
{
|
||||
ERR("Failed creating handle table\n");
|
||||
|
@ -108,6 +122,8 @@ InitUserImpl(VOID)
|
|||
|
||||
InitSysParams();
|
||||
|
||||
UserLeave();
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue