mirror of
https://github.com/reactos/reactos.git
synced 2024-07-11 07:05:12 +00:00
[WIN32K]
The winstation spinlock is a leftover of some old code. It can be removed. <+smiley1_> hbelusca: yeah the spinlock should be removed <@hbelusca> smiley1_ - was it from old code? <+smiley1_> hbelusca: go on svn path=/trunk/; revision=63612
This commit is contained in:
parent
df0cd9c93d
commit
ecf5e374ef
|
@ -451,9 +451,6 @@ NtUserCreateWindowStation(
|
|||
/* Initialize the window station */
|
||||
RtlZeroMemory(WindowStationObject, sizeof(WINSTATION_OBJECT));
|
||||
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KeInitializeSpinLock(&WindowStationObject->Lock);
|
||||
#endif
|
||||
InitializeListHead(&WindowStationObject->DesktopListHead);
|
||||
Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable);
|
||||
WindowStationObject->Name = WindowStationName;
|
||||
|
@ -1205,9 +1202,6 @@ BuildDesktopNameList(
|
|||
{
|
||||
NTSTATUS Status;
|
||||
PWINSTATION_OBJECT WindowStation;
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KIRQL OldLevel;
|
||||
#endif
|
||||
PLIST_ENTRY DesktopEntry;
|
||||
PDESKTOP DesktopObject;
|
||||
DWORD EntryCount;
|
||||
|
@ -1224,10 +1218,6 @@ BuildDesktopNameList(
|
|||
return Status;
|
||||
}
|
||||
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KeAcquireSpinLock(&WindowStation->Lock, &OldLevel);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Count the required size of buffer.
|
||||
*/
|
||||
|
@ -1248,9 +1238,6 @@ BuildDesktopNameList(
|
|||
Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
|
||||
#endif
|
||||
ObDereferenceObject(WindowStation);
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
@ -1261,9 +1248,6 @@ BuildDesktopNameList(
|
|||
*/
|
||||
if (dwSize < ReturnLength)
|
||||
{
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
|
||||
#endif
|
||||
ObDereferenceObject(WindowStation);
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
@ -1274,9 +1258,6 @@ BuildDesktopNameList(
|
|||
Status = MmCopyToCaller(lpBuffer, &EntryCount, sizeof(DWORD));
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
|
||||
#endif
|
||||
ObDereferenceObject(WindowStation);
|
||||
return Status;
|
||||
}
|
||||
|
@ -1292,9 +1273,6 @@ BuildDesktopNameList(
|
|||
Status = MmCopyToCaller(lpBuffer, DesktopName.Buffer, DesktopName.Length);
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
|
||||
#endif
|
||||
ObDereferenceObject(WindowStation);
|
||||
return Status;
|
||||
}
|
||||
|
@ -1302,9 +1280,6 @@ BuildDesktopNameList(
|
|||
Status = MmCopyToCaller(lpBuffer, &NullWchar, sizeof(WCHAR));
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
|
||||
#endif
|
||||
ObDereferenceObject(WindowStation);
|
||||
return Status;
|
||||
}
|
||||
|
@ -1312,13 +1287,9 @@ BuildDesktopNameList(
|
|||
}
|
||||
|
||||
/*
|
||||
* Clean up
|
||||
* Clean up and return
|
||||
*/
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
|
||||
#endif
|
||||
ObDereferenceObject(WindowStation);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,16 +7,10 @@
|
|||
#define WSS_LOCKED (1)
|
||||
#define WSS_NOINTERACTIVE (2)
|
||||
|
||||
// Uncomment for using WinSta spinlock
|
||||
// #define USE_WINSTA_LOCK
|
||||
|
||||
typedef struct _WINSTATION_OBJECT
|
||||
{
|
||||
DWORD dwSessionId;
|
||||
|
||||
#ifdef USE_WINSTA_LOCK
|
||||
KSPIN_LOCK Lock;
|
||||
#endif
|
||||
UNICODE_STRING Name;
|
||||
LIST_ENTRY DesktopListHead;
|
||||
PRTL_ATOM_TABLE AtomTable;
|
||||
|
|
Loading…
Reference in a new issue