ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2021
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
15 participants
161 discussions
Start a n
N
ew thread
[reactos] 02/02: [WS2_32] Check that the handle table is initialized before accessing it.
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0d41593749d21c51ee781…
commit 0d41593749d21c51ee78121f47a50a269ab80b7e Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Wed Mar 17 18:00:38 2021 +0100 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Mar 17 18:53:12 2021 +0100 [WS2_32] Check that the handle table is initialized before accessing it. --- dll/win32/ws2_32/src/dsocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/ws2_32/src/dsocket.c b/dll/win32/ws2_32/src/dsocket.c index ddc220ef25c..11486c22439 100644 --- a/dll/win32/ws2_32/src/dsocket.c +++ b/dll/win32/ws2_32/src/dsocket.c @@ -142,8 +142,8 @@ WsSockGetSocket(IN SOCKET Handle) PWSSOCKET Socket; /* Let WAH do the translation */ - if ((Socket = (PWSSOCKET)WahReferenceContextByHandle(WsSockHandleTable, - (HANDLE)Handle))) + if ((WsSockHandleTable != NULL) && + (Socket = (PWSSOCKET)WahReferenceContextByHandle(WsSockHandleTable, (HANDLE)Handle))) { return Socket; }
3 years, 9 months
1
0
0
0
[reactos] 01/02: [OLDNAMES] Add missing isascii
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=162f51e6b81446dac94f9…
commit 162f51e6b81446dac94f9b9ba4e1cae3ab9a3665 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Wed Mar 17 18:30:34 2021 +0100 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Wed Mar 17 18:52:58 2021 +0100 [OLDNAMES] Add missing isascii --- sdk/lib/crt/moldname-msvcrt.def | 1 + sdk/lib/crt/oldnames-msvcrt.S | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/lib/crt/moldname-msvcrt.def b/sdk/lib/crt/moldname-msvcrt.def index af6661fada4..0a12f951365 100644 --- a/sdk/lib/crt/moldname-msvcrt.def +++ b/sdk/lib/crt/moldname-msvcrt.def @@ -39,6 +39,7 @@ getcwd==_getcwd getpid==_getpid getw==_getw heapwalk==_heapwalk +isascii==__isascii isatty==_isatty itoa==_itoa kbhit==_kbhit diff --git a/sdk/lib/crt/oldnames-msvcrt.S b/sdk/lib/crt/oldnames-msvcrt.S index 3e07d8231b8..58d2f6e9491 100644 --- a/sdk/lib/crt/oldnames-msvcrt.S +++ b/sdk/lib/crt/oldnames-msvcrt.S @@ -42,12 +42,12 @@ ENDM CREATE_ALIAS1 $alias, $target IMPORT SYM($alias), WEAK SYM($target) MEND - + MACRO CREATE_ALIAS2 $alias, $target IMPORT IMPSYM($alias), WEAK IMPSYM($target) MEND - + MACRO CREATE_ALIAS $alias, $target CREATE_ALIAS1 $alias, $target @@ -97,6 +97,7 @@ ENDM CREATE_ALIAS getw, _getw CREATE_ALIAS heapwalk, _heapwalk CREATE_ALIAS isatty, _isatty + CREATE_ALIAS isascii, __isascii CREATE_ALIAS itoa, _itoa CREATE_ALIAS kbhit, _kbhit CREATE_ALIAS lfind, _lfind
3 years, 9 months
1
0
0
0
[reactos] 03/03: [NTOS:MM] Silence a DPRINT which became noisy
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d5fa0788d828a704e2bde…
commit d5fa0788d828a704e2bdeafe983119d4dc5aae7f Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Tue Mar 9 20:23:29 2021 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Tue Mar 16 13:23:21 2021 +0100 [NTOS:MM] Silence a DPRINT which became noisy --- ntoskrnl/mm/ARM3/virtual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntoskrnl/mm/ARM3/virtual.c b/ntoskrnl/mm/ARM3/virtual.c index 6234e58d7be..986b345e6c6 100644 --- a/ntoskrnl/mm/ARM3/virtual.c +++ b/ntoskrnl/mm/ARM3/virtual.c @@ -5277,7 +5277,7 @@ NtFreeVirtualMemory(IN HANDLE ProcessHandle, (Vad->u.VadFlags.VadType != VadRotatePhysical)) || (Vad->u.VadFlags.VadType == VadDevicePhysicalMemory)) { - DPRINT1("Attempt to free section memory\n"); + DPRINT("Attempt to free section memory\n"); Status = STATUS_UNABLE_TO_DELETE_SECTION; goto FailPath; }
3 years, 9 months
1
0
0
0
[reactos] 02/03: [RTL] Improve performance by introducing a hint array for free entries
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7e5c1872eebfaf94dd355…
commit 7e5c1872eebfaf94dd355adfeae47a3bfb0e9f6b Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Tue Mar 9 19:46:05 2021 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Tue Mar 16 13:23:21 2021 +0100 [RTL] Improve performance by introducing a hint array for free entries The array is there for the entries smaller than the decommit threshold, the rationale being that entries which are larger will likely be split for honoring other allocations or be coalesced and eventually decommitted. This with the previous commits make a huge perf boost to memory-intensive applications like cmake CORE-15793 --- sdk/lib/rtl/heap.c | 574 +++++++++++++++++++++++++++-------------------------- sdk/lib/rtl/heap.h | 11 +- 2 files changed, 296 insertions(+), 289 deletions(-) diff --git a/sdk/lib/rtl/heap.c b/sdk/lib/rtl/heap.c index 0e24cd48428..019a4f80216 100644 --- a/sdk/lib/rtl/heap.c +++ b/sdk/lib/rtl/heap.c @@ -113,6 +113,7 @@ RtlpInitializeHeap(OUT PHEAP Heap, SIZE_T HeaderSize; NTSTATUS Status; PHEAP_UCR_DESCRIPTOR UcrDescriptor; + SIZE_T DeCommitFreeBlockThreshold; /* Preconditions */ ASSERT(Heap != NULL); @@ -120,8 +121,11 @@ RtlpInitializeHeap(OUT PHEAP Heap, ASSERT(!(Flags & HEAP_LOCK_USER_ALLOCATED)); ASSERT(!(Flags & HEAP_NO_SERIALIZE) || (Lock == NULL)); /* HEAP_NO_SERIALIZE => no lock */ - /* Start out with the size of a plain Heap header */ - HeaderSize = ROUND_UP(sizeof(HEAP), sizeof(HEAP_ENTRY)); + /* Make sure we're not doing stupid things */ + DeCommitFreeBlockThreshold = Parameters->DeCommitFreeBlockThreshold >> HEAP_ENTRY_SHIFT; + /* Start out with the size of a plain Heap header + our hints of free entries + the bitmap */ + HeaderSize = FIELD_OFFSET(HEAP, FreeHints[DeCommitFreeBlockThreshold]) + + (ROUND_UP(DeCommitFreeBlockThreshold, RTL_BITS_OF(ULONG)) / RTL_BITS_OF(ULONG)) * sizeof(ULONG); /* Check if space needs to be added for the Heap Lock */ if (!(Flags & HEAP_NO_SERIALIZE)) @@ -134,14 +138,15 @@ RtlpInitializeHeap(OUT PHEAP Heap, { /* In user mode, the Heap Lock trails the Heap header */ Lock = (PHEAP_LOCK) ((ULONG_PTR) (Heap) + HeaderSize); - HeaderSize += ROUND_UP(sizeof(HEAP_LOCK), sizeof(HEAP_ENTRY)); + HeaderSize += sizeof(HEAP_LOCK); } } /* Add space for the initial Heap UnCommitted Range Descriptor list */ UcrDescriptor = (PHEAP_UCR_DESCRIPTOR) ((ULONG_PTR) (Heap) + HeaderSize); - HeaderSize += ROUND_UP(NumUCRs * sizeof(HEAP_UCR_DESCRIPTOR), sizeof(HEAP_ENTRY)); + HeaderSize += NumUCRs * sizeof(HEAP_UCR_DESCRIPTOR); + HeaderSize = ROUND_UP(HeaderSize, HEAP_ENTRY_SIZE); /* Sanity check */ ASSERT(HeaderSize <= PAGE_SIZE); @@ -170,7 +175,7 @@ RtlpInitializeHeap(OUT PHEAP Heap, Heap->VirtualMemoryThreshold = ROUND_UP(Parameters->VirtualMemoryThreshold, sizeof(HEAP_ENTRY)) >> HEAP_ENTRY_SHIFT; Heap->SegmentReserve = Parameters->SegmentReserve; Heap->SegmentCommit = Parameters->SegmentCommit; - Heap->DeCommitFreeBlockThreshold = Parameters->DeCommitFreeBlockThreshold >> HEAP_ENTRY_SHIFT; + Heap->DeCommitFreeBlockThreshold = DeCommitFreeBlockThreshold; Heap->DeCommitTotalFreeThreshold = Parameters->DeCommitTotalFreeThreshold >> HEAP_ENTRY_SHIFT; Heap->MaximumAllocationSize = Parameters->MaximumAllocationSize; Heap->CommitRoutine = Parameters->CommitRoutine; @@ -207,9 +212,13 @@ RtlpInitializeHeap(OUT PHEAP Heap, for (Index = 0; Index < HEAP_SEGMENTS; ++Index) Heap->Segments[Index] = NULL; - /* Initialise the Heap Free Heap Entry lists */ - for (Index = 0; Index < HEAP_FREELISTS; ++Index) - InitializeListHead(&Heap->FreeLists[Index]); + /* Initialise the free entry lists. */ + InitializeListHead(&Heap->FreeLists); + RtlInitializeBitMap(&Heap->FreeHintBitmap, + (PULONG)&Heap->FreeHints[DeCommitFreeBlockThreshold], + DeCommitFreeBlockThreshold); + RtlClearAllBits(&Heap->FreeHintBitmap); + RtlZeroMemory(&Heap->FreeHints[0], sizeof(Heap->FreeHints[0]) * DeCommitFreeBlockThreshold); /* Initialise the Heap Virtual Allocated Blocks list */ InitializeListHead(&Heap->VirtualAllocdBlocks); @@ -225,55 +234,13 @@ RtlpInitializeHeap(OUT PHEAP Heap, return STATUS_SUCCESS; } -FORCEINLINE -VOID -RtlpSetFreeListsBit(PHEAP Heap, - PHEAP_FREE_ENTRY FreeEntry) -{ - ULONG Index, Bit; - - ASSERT(FreeEntry->Size < HEAP_FREELISTS); - - /* Calculate offset in the free list bitmap */ - Index = FreeEntry->Size >> 3; /* = FreeEntry->Size / (sizeof(UCHAR) * 8)*/ - Bit = 1 << (FreeEntry->Size & 7); - - /* Assure it's not already set */ - ASSERT((Heap->u.FreeListsInUseBytes[Index] & Bit) == 0); - - /* Set it */ - Heap->u.FreeListsInUseBytes[Index] |= Bit; -} - -FORCEINLINE -VOID -RtlpClearFreeListsBit(PHEAP Heap, - PHEAP_FREE_ENTRY FreeEntry) -{ - ULONG Index, Bit; - - ASSERT(FreeEntry->Size < HEAP_FREELISTS); - - /* Calculate offset in the free list bitmap */ - Index = FreeEntry->Size >> 3; /* = FreeEntry->Size / (sizeof(UCHAR) * 8)*/ - Bit = 1 << (FreeEntry->Size & 7); - - /* Assure it was set and the corresponding free list is empty */ - ASSERT(Heap->u.FreeListsInUseBytes[Index] & Bit); - ASSERT(IsListEmpty(&Heap->FreeLists[FreeEntry->Size])); - - /* Clear it */ - Heap->u.FreeListsInUseBytes[Index] ^= Bit; -} - VOID NTAPI RtlpInsertFreeBlockHelper(PHEAP Heap, PHEAP_FREE_ENTRY FreeEntry, SIZE_T BlockSize, BOOLEAN NoFill) { - PLIST_ENTRY FreeListHead, Current; - PHEAP_FREE_ENTRY CurrentEntry; + ULONG HintIndex, NextHintIndex; ASSERT(FreeEntry->Size == BlockSize); @@ -299,39 +266,91 @@ RtlpInsertFreeBlockHelper(PHEAP Heap, FreeEntry->Flags &= HEAP_ENTRY_LAST_ENTRY; } - /* Insert it either into dedicated or non-dedicated list */ - if (BlockSize < HEAP_FREELISTS) + /* See if this should go to the dedicated list */ + if (BlockSize > Heap->DeCommitFreeBlockThreshold) { - /* Dedicated list */ - FreeListHead = &Heap->FreeLists[BlockSize]; + PLIST_ENTRY ListEntry = Heap->FreeHints[0]; - if (IsListEmpty(FreeListHead)) + /* Check if we have a hint there */ + if (ListEntry == NULL) { - RtlpSetFreeListsBit(Heap, FreeEntry); + ASSERT(!RtlTestBit(&Heap->FreeHintBitmap, 0)); + Heap->FreeHints[0] = &FreeEntry->FreeList; + RtlSetBit(&Heap->FreeHintBitmap, 0); + InsertTailList(&Heap->FreeLists, &FreeEntry->FreeList); + return; } - } - else - { - /* Non-dedicated one */ - FreeListHead = &Heap->FreeLists[0]; - Current = FreeListHead->Flink; - /* Find a position where to insert it to (the list must be sorted) */ - while (FreeListHead != Current) - { - CurrentEntry = CONTAINING_RECORD(Current, HEAP_FREE_ENTRY, FreeList); + ASSERT(RtlTestBit(&Heap->FreeHintBitmap, 0)); - if (BlockSize <= CurrentEntry->Size) + while (ListEntry != &Heap->FreeLists) + { + PHEAP_FREE_ENTRY PreviousEntry = CONTAINING_RECORD(ListEntry, + HEAP_FREE_ENTRY, + FreeList); + if (PreviousEntry->Size >= BlockSize) + { + DPRINT("Inserting size %lu before %lu.\n", BlockSize, PreviousEntry->Size); break; + } - Current = Current->Flink; + ListEntry = ListEntry->Flink; } - FreeListHead = Current; + InsertTailList(ListEntry, &FreeEntry->FreeList); + + /* Update our hint if needed */ + if (Heap->FreeHints[0] == ListEntry) + Heap->FreeHints[0] = &FreeEntry->FreeList; + + return; + } + + ASSERT(BlockSize >= 2); + HintIndex = BlockSize - 1; + + if (Heap->FreeHints[HintIndex] != NULL) + { + ASSERT(RtlTestBit(&Heap->FreeHintBitmap, HintIndex)); + + /* Insert it after our hint. */ + InsertHeadList(Heap->FreeHints[HintIndex], &FreeEntry->FreeList); + + return; + } + + /* This is the first time we insert such an entry in the list. */ + ASSERT(!RtlTestBit(&Heap->FreeHintBitmap, HintIndex)); + if (IsListEmpty(&Heap->FreeLists)) + { + /* First entry inserted in this list ever */ + InsertHeadList(&Heap->FreeLists, &FreeEntry->FreeList); + RtlSetBit(&Heap->FreeHintBitmap, HintIndex); + Heap->FreeHints[HintIndex] = &FreeEntry->FreeList; + return; + } + + /* Find the closest one */ + NextHintIndex = RtlFindSetBits(&Heap->FreeHintBitmap, 1, HintIndex); + ASSERT(NextHintIndex != 0xFFFFFFFF); + if ((NextHintIndex == 0) || (NextHintIndex > HintIndex)) + { + /* + * We found a larger entry. Insert this one before. + * It is guaranteed to be our successor in the list. + */ + InsertTailList(Heap->FreeHints[NextHintIndex], &FreeEntry->FreeList); + } + else + { + /* We only found an entry smaller than us. Then we will be the largest one. */ + ASSERT(CONTAINING_RECORD(Heap->FreeLists.Blink, HEAP_FREE_ENTRY, FreeList)->Size < BlockSize); + InsertTailList(&Heap->FreeLists, &FreeEntry->FreeList); } - /* Actually insert it into the list */ - InsertTailList(FreeListHead, &FreeEntry->FreeList); + /* Setup our hint */ + RtlSetBit(&Heap->FreeHintBitmap, HintIndex); + Heap->FreeHints[HintIndex] = &FreeEntry->FreeList; } VOID NTAPI @@ -398,21 +417,58 @@ RtlpInsertFreeBlock(PHEAP Heap, FreeEntry->PreviousSize = PreviousSize; } -VOID NTAPI +static +VOID RtlpRemoveFreeBlock(PHEAP Heap, PHEAP_FREE_ENTRY FreeEntry, - BOOLEAN Dedicated, BOOLEAN NoFill) { SIZE_T Result, RealSize; + ULONG HintIndex; + + /* Remove the free block */ + if (FreeEntry->Size > Heap->DeCommitFreeBlockThreshold) + HintIndex = 0; + else + HintIndex = FreeEntry->Size - 1; + + ASSERT(RtlTestBit(&Heap->FreeHintBitmap, HintIndex)); - /* Remove the free block and update the freelists bitmap */ - if (RemoveEntryList(&FreeEntry->FreeList) && - (Dedicated || (!Dedicated && FreeEntry->Size < HEAP_FREELISTS))) + /* Are we removing the hint entry for this size ? */ + if (Heap->FreeHints[HintIndex] == &FreeEntry->FreeList) { - RtlpClearFreeListsBit(Heap, FreeEntry); + PHEAP_FREE_ENTRY NewHintEntry = NULL; + if (FreeEntry->FreeList.Flink != &Heap->FreeLists) + { + NewHintEntry = CONTAINING_RECORD(FreeEntry->FreeList.Flink, + HEAP_FREE_ENTRY, + FreeList); + /* + * In non-dedicated list, we just put the next entry as hint. + * For the dedicated ones, we take care of putting entries of the right size hint. + */ + if ((HintIndex != 0) && (NewHintEntry->Size != FreeEntry->Size)) + { + /* Of course this must be a larger one after us */ + ASSERT(NewHintEntry->Size > FreeEntry->Size); + NewHintEntry = NULL; + } + } + + /* Replace the hint, if we can */ + if (NewHintEntry != NULL) + { + Heap->FreeHints[HintIndex] = &NewHintEntry->FreeList; + } + else + { + Heap->FreeHints[HintIndex] = NULL; + RtlClearBit(&Heap->FreeHintBitmap, HintIndex); + } } + RemoveEntryList(&FreeEntry->FreeList); + /* Fill with pattern if necessary */ if (!NoFill && (FreeEntry->Flags & HEAP_ENTRY_FILL_PATTERN)) @@ -1112,7 +1168,7 @@ RtlpCoalesceFreeBlocks (PHEAP Heap, /* Remove it if asked for */ if (Remove) { - RtlpRemoveFreeBlock(Heap, FreeEntry, FALSE, FALSE); + RtlpRemoveFreeBlock(Heap, FreeEntry, FALSE); Heap->TotalFreeSize -= FreeEntry->Size; /* Remove it only once! */ @@ -1120,7 +1176,7 @@ RtlpCoalesceFreeBlocks (PHEAP Heap, } /* Remove previous entry too */ - RtlpRemoveFreeBlock(Heap, CurrentEntry, FALSE, FALSE); + RtlpRemoveFreeBlock(Heap, CurrentEntry, FALSE); /* Copy flags */ CurrentEntry->Flags = FreeEntry->Flags & HEAP_ENTRY_LAST_ENTRY; @@ -1156,7 +1212,7 @@ RtlpCoalesceFreeBlocks (PHEAP Heap, /* Remove it if asked for */ if (Remove) { - RtlpRemoveFreeBlock(Heap, FreeEntry, FALSE, FALSE); + RtlpRemoveFreeBlock(Heap, FreeEntry, FALSE); Heap->TotalFreeSize -= FreeEntry->Size; } @@ -1164,7 +1220,7 @@ RtlpCoalesceFreeBlocks (PHEAP Heap, FreeEntry->Flags = NextEntry->Flags & HEAP_ENTRY_LAST_ENTRY; /* Remove next entry now */ - RtlpRemoveFreeBlock(Heap, NextEntry, FALSE, FALSE); + RtlpRemoveFreeBlock(Heap, NextEntry, FALSE); /* Update sizes */ *FreeSize = *FreeSize + NextEntry->Size; @@ -1186,7 +1242,8 @@ RtlpCoalesceFreeBlocks (PHEAP Heap, return FreeEntry; } -PHEAP_FREE_ENTRY NTAPI +static +PHEAP_FREE_ENTRY RtlpExtendHeap(PHEAP Heap, SIZE_T Size) { @@ -1451,6 +1508,13 @@ RtlCreateHeap(ULONG Flags, Parameters->VirtualMemoryThreshold = MaxBlockSize; } + if (Parameters->DeCommitFreeBlockThreshold != PAGE_SIZE) + { + DPRINT1("WARNING: Ignoring DeCommitFreeBlockThreshold %lx, setting it to PAGE_SIZE.\n", + Parameters->DeCommitFreeBlockThreshold); + Parameters->DeCommitFreeBlockThreshold = PAGE_SIZE; + } + /* Check reserve/commit sizes and set default values */ if (!CommitSize) { @@ -1840,7 +1904,7 @@ RtlpSplitEntry(PHEAP Heap, SplitBlock->Flags = SplitBlock2->Flags; /* Remove that next entry */ - RtlpRemoveFreeBlock(Heap, SplitBlock2, FALSE, FALSE); + RtlpRemoveFreeBlock(Heap, SplitBlock2, FALSE); /* Update sizes */ FreeSize += SplitBlock2->Size; @@ -1888,7 +1952,8 @@ RtlpSplitEntry(PHEAP Heap, return InUseEntry; } -PVOID NTAPI +static +PVOID RtlpAllocateNonDedicated(PHEAP Heap, ULONG Flags, SIZE_T Size, @@ -1896,85 +1961,22 @@ RtlpAllocateNonDedicated(PHEAP Heap, SIZE_T Index, BOOLEAN HeapLocked) { - PLIST_ENTRY FreeListHead, Next; PHEAP_FREE_ENTRY FreeBlock; - PHEAP_ENTRY InUseEntry; - PHEAP_ENTRY_EXTRA Extra; - EXCEPTION_RECORD ExceptionRecord; - - /* Go through the zero list to find a place where to insert the new entry */ - FreeListHead = &Heap->FreeLists[0]; - - /* Start from the largest block to reduce time */ - Next = FreeListHead->Blink; - if (FreeListHead != Next) - { - FreeBlock = CONTAINING_RECORD(Next, HEAP_FREE_ENTRY, FreeList); - - if (FreeBlock->Size >= Index) - { - /* Our request is smaller than the largest entry in the zero list */ - - /* Go through the list to find insertion place */ - Next = FreeListHead->Flink; - while (FreeListHead != Next) - { - FreeBlock = CONTAINING_RECORD(Next, HEAP_FREE_ENTRY, FreeList); - - if (FreeBlock->Size >= Index) - { - /* Found minimally fitting entry. Proceed to either using it as it is - or splitting it to two entries */ - RemoveEntryList(&FreeBlock->FreeList); - - /* Split it */ - InUseEntry = RtlpSplitEntry(Heap, Flags, FreeBlock, AllocationSize, Index, Size); - - /* Release the lock */ - if (HeapLocked) RtlLeaveHeapLock(Heap->LockVariable); - - /* Zero memory if that was requested */ - if (Flags & HEAP_ZERO_MEMORY) - RtlZeroMemory(InUseEntry + 1, Size); - else if (Heap->Flags & HEAP_FREE_CHECKING_ENABLED) - { - /* Fill this block with a special pattern */ - RtlFillMemoryUlong(InUseEntry + 1, Size & ~0x3, ARENA_INUSE_FILLER); - } - - /* Fill tail of the block with a special pattern too if requested */ - if (Heap->Flags & HEAP_TAIL_CHECKING_ENABLED) - { - RtlFillMemory((PCHAR)(InUseEntry + 1) + Size, sizeof(HEAP_ENTRY), HEAP_TAIL_FILL); - InUseEntry->Flags |= HEAP_ENTRY_FILL_PATTERN; - } - - /* Prepare extra if it's present */ - if (InUseEntry->Flags & HEAP_ENTRY_EXTRA_PRESENT) - { - Extra = RtlpGetExtraStuffPointer(InUseEntry); - RtlZeroMemory(Extra, sizeof(HEAP_ENTRY_EXTRA)); - - // TODO: Tagging - } - - /* Return pointer to the */ - return InUseEntry + 1; - } - /* Advance to the next entry */ - Next = Next->Flink; - } - } - } + /* The entries in the list must be too small for us */ + ASSERT(IsListEmpty(&Heap->FreeLists) || + (CONTAINING_RECORD(Heap->FreeLists.Blink, HEAP_FREE_ENTRY, FreeList)->Size < Index)); - /* Extend the heap, 0 list didn't have anything suitable */ + /* Extend the heap */ FreeBlock = RtlpExtendHeap(Heap, AllocationSize); /* Use the new biggest entry we've got */ if (FreeBlock) { - RemoveEntryList(&FreeBlock->FreeList); + PHEAP_ENTRY InUseEntry; + PHEAP_ENTRY_EXTRA Extra; + + RtlpRemoveFreeBlock(Heap, FreeBlock, TRUE); /* Split it */ InUseEntry = RtlpSplitEntry(Heap, Flags, FreeBlock, AllocationSize, Index, Size); @@ -2017,6 +2019,8 @@ RtlpAllocateNonDedicated(PHEAP Heap, /* Generate an exception */ if (Flags & HEAP_GENERATE_EXCEPTIONS) { + EXCEPTION_RECORD ExceptionRecord; + ExceptionRecord.ExceptionCode = STATUS_NO_MEMORY; ExceptionRecord.ExceptionRecord = NULL; ExceptionRecord.NumberParameters = 1; @@ -2049,11 +2053,7 @@ RtlAllocateHeap(IN PVOID HeapPtr, PHEAP Heap = (PHEAP)HeapPtr; SIZE_T AllocationSize; SIZE_T Index; - PLIST_ENTRY FreeListHead; - PHEAP_ENTRY InUseEntry; - PHEAP_FREE_ENTRY FreeBlock; - UCHAR FreeFlags, EntryFlags = HEAP_ENTRY_BUSY; - EXCEPTION_RECORD ExceptionRecord; + UCHAR EntryFlags = HEAP_ENTRY_BUSY; BOOLEAN HeapLocked = FALSE; PHEAP_VIRTUAL_ALLOC_ENTRY VirtualBlock = NULL; PHEAP_ENTRY_EXTRA Extra; @@ -2115,72 +2115,54 @@ RtlAllocateHeap(IN PVOID HeapPtr, /* Depending on the size, the allocation is going to be done from dedicated, non-dedicated lists or a virtual block of memory */ - if (Index < HEAP_FREELISTS) + if (Index <= Heap->VirtualMemoryThreshold) { - FreeListHead = &Heap->FreeLists[Index]; + PHEAP_ENTRY InUseEntry; + PHEAP_FREE_ENTRY FreeEntry; - if (!IsListEmpty(FreeListHead)) - { - /* There is a free entry in this list */ - FreeBlock = CONTAINING_RECORD(FreeListHead->Blink, - HEAP_FREE_ENTRY, - FreeList); + /* First quick check: Anybody here ? */ + if (IsListEmpty(&Heap->FreeLists)) + return RtlpAllocateNonDedicated(Heap, Flags, Size, AllocationSize, Index, HeapLocked); - /* Save flags and remove the free entry */ - FreeFlags = FreeBlock->Flags; - RtlpRemoveFreeBlock(Heap, FreeBlock, TRUE, FALSE); + /* Second quick check: Is there someone for us ? */ + FreeEntry = CONTAINING_RECORD(Heap->FreeLists.Blink, HEAP_FREE_ENTRY, FreeList); + if (FreeEntry->Size < Index) + { + /* Largest entry in the list doesnt fit. */ + return RtlpAllocateNonDedicated(Heap, Flags, Size, AllocationSize, Index, HeapLocked); + } - /* Update the total free size of the heap */ - Heap->TotalFreeSize -= Index; + if (Index > Heap->DeCommitFreeBlockThreshold) + { + /* Find an entry from the non dedicated list */ + FreeEntry = CONTAINING_RECORD(Heap->FreeHints[0], + HEAP_FREE_ENTRY, + FreeList); - /* Initialize this block */ - InUseEntry = (PHEAP_ENTRY)FreeBlock; - InUseEntry->Flags = EntryFlags | (FreeFlags & HEAP_ENTRY_LAST_ENTRY); - InUseEntry->UnusedBytes = (UCHAR)(AllocationSize - Size); - InUseEntry->SmallTagIndex = 0; + while (FreeEntry->Size < Index) + { + /* We made sure we had the right size available */ + ASSERT(FreeEntry->FreeList.Flink != &Heap->FreeLists); + FreeEntry = CONTAINING_RECORD(FreeEntry->FreeList.Flink, + HEAP_FREE_ENTRY, + FreeList); + } } else { - /* Find smallest free block which this request could fit in */ - ULONG InUseIndex = Index >> 5; - ULONG InUseMask; - ULONG Bit; - - /* Sanity check */ - ASSERT(InUseIndex < ARRAYSIZE(Heap->u.FreeListsInUseUlong)); - - /* Now check if there is a free entry for us. Beware of getting the right bit mask for the first iteration. */ - InUseMask = ~((1UL << (Index & 0x1F)) - 1); - InUseMask &= Heap->u.FreeListsInUseUlong[InUseIndex]; - DPRINT("InUseIndex %u, InUseMask %x, Index %u\n", InUseIndex, InUseMask, Index); - while (!BitScanForward(&Bit, InUseMask)) - { - InUseIndex++; - if (InUseIndex == ARRAYSIZE(Heap->u.FreeListsInUseUlong)) - { - /* No luck this time. Go the dedicated way */ - return RtlpAllocateNonDedicated(Heap, Flags, Size, AllocationSize, Index, HeapLocked); - } - InUseMask = Heap->u.FreeListsInUseUlong[InUseIndex]; - } - - /* Of course we must be in a list for entries bigger than what we were looking for in the first place */ - DPRINT("InUseIndex %u, Bit %u, Index %u\n", InUseIndex, Bit, Index); - ASSERT(((InUseIndex << 5) + Bit) > Index); - FreeListHead = &Heap->FreeLists[(InUseIndex << 5) + Bit]; - - ASSERT(!IsListEmpty(FreeListHead)); - - /* Take this entry and remove it from the list of free blocks */ - FreeBlock = CONTAINING_RECORD(FreeListHead->Blink, + /* Get the free entry from the hint */ + ULONG HintIndex = RtlFindSetBits(&Heap->FreeHintBitmap, 1, Index - 1); + ASSERT(HintIndex != 0xFFFFFFFF); + ASSERT((HintIndex >= (Index - 1)) || (HintIndex == 0)); + FreeEntry = CONTAINING_RECORD(Heap->FreeHints[HintIndex], HEAP_FREE_ENTRY, FreeList); - RtlpRemoveFreeBlock(Heap, FreeBlock, TRUE, FALSE); - - /* Split it */ - InUseEntry = RtlpSplitEntry(Heap, Flags, FreeBlock, AllocationSize, Index, Size); } + /* Remove the free block, split, profit. */ + RtlpRemoveFreeBlock(Heap, FreeEntry, FALSE); + InUseEntry = RtlpSplitEntry(Heap, Flags, FreeEntry, AllocationSize, Index, Size); + /* Release the lock */ if (HeapLocked) RtlLeaveHeapLock(Heap->LockVariable); @@ -2212,12 +2194,8 @@ RtlAllocateHeap(IN PVOID HeapPtr, /* User data starts right after the entry's header */ return InUseEntry + 1; } - else if (Index <= Heap->VirtualMemoryThreshold) - { - /* The block is too large for dedicated lists, but fine for a non-dedicated one */ - return RtlpAllocateNonDedicated(Heap, Flags, Size, AllocationSize, Index, HeapLocked); - } - else if (Heap->Flags & HEAP_GROWABLE) + + if (Heap->Flags & HEAP_GROWABLE) { /* We've got a very big allocation request, satisfy it by directly allocating virtual memory */ AllocationSize += sizeof(HEAP_VIRTUAL_ALLOC_ENTRY) - sizeof(HEAP_ENTRY); @@ -2258,6 +2236,8 @@ RtlAllocateHeap(IN PVOID HeapPtr, /* Generate an exception */ if (Flags & HEAP_GENERATE_EXCEPTIONS) { + EXCEPTION_RECORD ExceptionRecord; + ExceptionRecord.ExceptionCode = STATUS_NO_MEMORY; ExceptionRecord.ExceptionRecord = NULL; ExceptionRecord.NumberParameters = 1; @@ -2477,7 +2457,7 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, RememberFlags = FreeEntry->Flags; /* Remove this block from the free list */ - RtlpRemoveFreeBlock(Heap, FreeEntry, FALSE, FALSE); + RtlpRemoveFreeBlock(Heap, FreeEntry, FALSE); Heap->TotalFreeSize -= FreeEntry->Size; } @@ -2572,7 +2552,7 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, RememberFlags = FollowingEntry->Flags; /* Remove it */ - RtlpRemoveFreeBlock(Heap, FollowingEntry, FALSE, FALSE); + RtlpRemoveFreeBlock(Heap, FollowingEntry, FALSE); Heap->TotalFreeSize -= FollowingEntry->Size; /* And make up a new combined block */ @@ -2949,7 +2929,7 @@ RtlReAllocateHeap(HANDLE HeapPtr, SplitBlock->Flags = SplitBlock2->Flags; /* Remove it, update total size */ - RtlpRemoveFreeBlock(Heap, SplitBlock2, FALSE, FALSE); + RtlpRemoveFreeBlock(Heap, SplitBlock2, FALSE); Heap->TotalFreeSize -= SplitBlock2->Size; /* Calculate total free size */ @@ -3533,15 +3513,11 @@ BOOLEAN NTAPI RtlpValidateHeap(PHEAP Heap, BOOLEAN ForceValidation) { - PHEAP_SEGMENT Segment; - BOOLEAN EmptyList; UCHAR SegmentOffset; - SIZE_T Size, TotalFreeSize; - ULONG PreviousSize; - PHEAP_VIRTUAL_ALLOC_ENTRY VirtualAllocBlock; + SIZE_T TotalFreeSize; PLIST_ENTRY ListHead, NextEntry; - PHEAP_FREE_ENTRY FreeEntry; ULONG FreeBlocksCount, FreeListEntriesCount; + ULONG HintIndex; /* Check headers */ if (!RtlpValidateHeapHeaders(Heap, FALSE)) @@ -3551,77 +3527,112 @@ RtlpValidateHeap(PHEAP Heap, if (!ForceValidation && !(Heap->Flags & HEAP_VALIDATE_ALL_ENABLED)) return TRUE; - /* Check free lists bitmaps */ + /* Check free list */ FreeListEntriesCount = 0; - ListHead = &Heap->FreeLists[0]; + ListHead = &Heap->FreeLists; + NextEntry = ListHead->Flink; - for (Size = 0; Size < HEAP_FREELISTS; Size++) + while (NextEntry != ListHead) { - if (Size) + PHEAP_FREE_ENTRY FreeEntry = CONTAINING_RECORD(NextEntry, HEAP_FREE_ENTRY, FreeList); + + NextEntry = NextEntry->Flink; + + if (NextEntry != ListHead) { - /* This is a dedicated list. Check if it's empty */ - EmptyList = IsListEmpty(ListHead); + PHEAP_FREE_ENTRY NextFreeEntry = CONTAINING_RECORD(NextEntry, HEAP_FREE_ENTRY, FreeList); + /* Free entries must be sorted */ + if (FreeEntry->Size > NextFreeEntry->Size) + { + DPRINT1("Dedicated free entry %p of size %ld is not put in order.\n", FreeEntry, FreeEntry->Size); + } + } - if (Heap->u.FreeListsInUseBytes[Size >> 3] & (1 << (Size & 7))) + /* Check that the hint is there */ + if (FreeEntry->Size > Heap->DeCommitFreeBlockThreshold) + { + if (Heap->FreeHints[0] == NULL) { - if (EmptyList) - { - DPRINT1("HEAP: Empty %x-free list marked as non-empty\n", Size); - return FALSE; - } + DPRINT1("No hint pointing to the non-dedicated list although there is a free entry %p of size %ld.\n", + FreeEntry, FreeEntry->Size); } - else + if (!RtlTestBit(&Heap->FreeHintBitmap, 0)) { - if (!EmptyList) - { - DPRINT1("HEAP: Non-empty %x-free list marked as empty\n", Size); - return FALSE; - } + DPRINT1("Hint bit 0 is not set although there is a free entry %p of size %ld.\n", + FreeEntry, FreeEntry->Size); + } + } + else + { + if (Heap->FreeHints[FreeEntry->Size - 1] == NULL) + { + DPRINT1("No hint pointing to the dedicated list although there is a free entry %p of size %ld.\n", + FreeEntry, FreeEntry->Size); + } + if (!RtlTestBit(&Heap->FreeHintBitmap, FreeEntry->Size - 1)) + { + DPRINT1("Hint bit 0 is not set although there is a free entry %p of size %ld.\n", + FreeEntry, FreeEntry->Size); } } - /* Now check this list entries */ - NextEntry = ListHead->Flink; - PreviousSize = 0; + /* If there is an in-use entry in a free list - that's quite a big problem */ + if (FreeEntry->Flags & HEAP_ENTRY_BUSY) + { + DPRINT1("HEAP: Free element %p is marked in-use\n", FreeEntry); + return FALSE; + } + + /* Add up to the total amount of free entries */ + FreeListEntriesCount++; + } - while (ListHead != NextEntry) + /* Check free list hints */ + for (HintIndex = 0; HintIndex < Heap->DeCommitFreeBlockThreshold; HintIndex++) + { + if (Heap->FreeHints[HintIndex] != NULL) { - FreeEntry = CONTAINING_RECORD(NextEntry, HEAP_FREE_ENTRY, FreeList); - NextEntry = NextEntry->Flink; + PHEAP_FREE_ENTRY FreeEntry = CONTAINING_RECORD(Heap->FreeHints[HintIndex], HEAP_FREE_ENTRY, FreeList); - /* If there is an in-use entry in a free list - that's quite a big problem */ - if (FreeEntry->Flags & HEAP_ENTRY_BUSY) + if (!RtlTestBit(&Heap->FreeHintBitmap, HintIndex)) { - DPRINT1("HEAP: %Ix-dedicated list free element %p is marked in-use\n", Size, FreeEntry); - return FALSE; + DPRINT1("Hint bitmap bit at %u is not set, but there is a hint entry.\n", HintIndex); } - /* Check sizes according to that specific list's size */ - if ((Size == 0) && (FreeEntry->Size < HEAP_FREELISTS)) - { - DPRINT1("HEAP: Non dedicated list free element %p has size %x which would fit a dedicated list\n", FreeEntry, FreeEntry->Size); - return FALSE; - } - else if (Size && (FreeEntry->Size != Size)) + if (HintIndex == 0) { - DPRINT1("HEAP: %Ix-dedicated list free element %p has incorrect size %x\n", Size, FreeEntry, FreeEntry->Size); - return FALSE; + if (FreeEntry->Size <= Heap->DeCommitFreeBlockThreshold) + { + DPRINT1("There is an entry %p of size %lu, smaller than the decommit threshold %lu in the non-dedicated free list hint.\n", + FreeEntry, FreeEntry->Size, Heap->DeCommitFreeBlockThreshold); + } } - else if ((Size == 0) && (FreeEntry->Size < PreviousSize)) + else { - DPRINT1("HEAP: Non dedicated list free element %p is not put in order\n", FreeEntry); - return FALSE; - } - - /* Remember previous size*/ - PreviousSize = FreeEntry->Size; + if (HintIndex != FreeEntry->Size - 1) + { + DPRINT1("There is an entry %p of size %lu at the position %u in the free entry hint array.\n", + FreeEntry, FreeEntry->Size, HintIndex); + } - /* Add up to the total amount of free entries */ - FreeListEntriesCount++; + if (FreeEntry->FreeList.Blink != &Heap->FreeLists) + { + /* The entry right before the hint must be smaller. */ + PHEAP_FREE_ENTRY PreviousFreeEntry = CONTAINING_RECORD(FreeEntry->FreeList.Blink, + HEAP_FREE_ENTRY, + FreeList); + if (PreviousFreeEntry->Size >= FreeEntry->Size) + { + DPRINT1("Free entry hint %p of size %lu is larger than the entry before it %p, which is of size %lu.\n", + FreeEntry, FreeEntry->Size, PreviousFreeEntry, PreviousFreeEntry->Size); + } + } + } + } + else if (RtlTestBit(&Heap->FreeHintBitmap, HintIndex)) + { + DPRINT1("Hint bitmap bit at %u is set, but there is no hint entry.\n", HintIndex); } - - /* Go to the head of the next free list */ - ListHead++; } /* Check big allocations */ @@ -3630,7 +3641,7 @@ RtlpValidateHeap(PHEAP Heap, while (ListHead != NextEntry) { - VirtualAllocBlock = CONTAINING_RECORD(NextEntry, HEAP_VIRTUAL_ALLOC_ENTRY, Entry); + PHEAP_VIRTUAL_ALLOC_ENTRY VirtualAllocBlock = CONTAINING_RECORD(NextEntry, HEAP_VIRTUAL_ALLOC_ENTRY, Entry); /* We can only check the fill pattern */ if (VirtualAllocBlock->BusyBlock.Flags & HEAP_ENTRY_FILL_PATTERN) @@ -3648,7 +3659,7 @@ RtlpValidateHeap(PHEAP Heap, for (SegmentOffset = 0; SegmentOffset < HEAP_SEGMENTS; SegmentOffset++) { - Segment = Heap->Segments[SegmentOffset]; + PHEAP_SEGMENT Segment = Heap->Segments[SegmentOffset]; /* Go to the next one if there is no segment */ if (!Segment) continue; @@ -4197,3 +4208,4 @@ RtlQueryProcessHeapInformation( } /* EOF */ + diff --git a/sdk/lib/rtl/heap.h b/sdk/lib/rtl/heap.h index 881897d589c..5eaefde8b2f 100644 --- a/sdk/lib/rtl/heap.h +++ b/sdk/lib/rtl/heap.h @@ -12,7 +12,6 @@ #define RTL_HEAP_H /* Core heap definitions */ -#define HEAP_FREELISTS 128 #define HEAP_SEGMENTS 64 #define HEAP_ENTRY_SIZE ((ULONG)sizeof(HEAP_ENTRY)) @@ -257,13 +256,7 @@ typedef struct _HEAP PVOID BlocksIndex; // HEAP_LIST_LOOKUP PVOID UCRIndex; PHEAP_PSEUDO_TAG_ENTRY PseudoTagEntries; - LIST_ENTRY FreeLists[HEAP_FREELISTS]; //FIXME: non-Vista - //LIST_ENTRY FreeLists; - union - { - ULONG FreeListsInUseUlong[HEAP_FREELISTS / (sizeof(ULONG) * 8)]; //FIXME: non-Vista - UCHAR FreeListsInUseBytes[HEAP_FREELISTS / (sizeof(UCHAR) * 8)]; //FIXME: non-Vista - } u; + LIST_ENTRY FreeLists; PHEAP_LOCK LockVariable; PRTL_HEAP_COMMIT_ROUTINE CommitRoutine; PVOID FrontEndHeap; @@ -271,6 +264,8 @@ typedef struct _HEAP UCHAR FrontEndHeapType; HEAP_COUNTERS Counters; HEAP_TUNING_PARAMETERS TuningParameters; + RTL_BITMAP FreeHintBitmap; // FIXME: non-Vista + PLIST_ENTRY FreeHints[ANYSIZE_ARRAY]; // FIXME: non-Vista } HEAP, *PHEAP; typedef struct _HEAP_SEGMENT
3 years, 9 months
1
0
0
0
[reactos] 01/03: [SDK:RTL] Track the end of uncommitted ranges thanks to a "Guard" entry that we put at the end of each committed page
by Jérôme Gardou
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=325737f855d7ea89c08e7…
commit 325737f855d7ea89c08e7ddf6902863ff02ce743 Author: Jérôme Gardou <jerome.gardou(a)reactos.org> AuthorDate: Fri Mar 5 13:04:52 2021 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Tue Mar 16 13:23:21 2021 +0100 [SDK:RTL] Track the end of uncommitted ranges thanks to a "Guard" entry that we put at the end of each committed page This avoids busy loop to get the last valid entry of the previous committed range when committing a new one. CORE-15793 --- sdk/lib/rtl/heap.c | 459 ++++++++++++++++++++++++++++++----------------------- sdk/lib/rtl/heap.h | 4 +- 2 files changed, 263 insertions(+), 200 deletions(-) diff --git a/sdk/lib/rtl/heap.c b/sdk/lib/rtl/heap.c index 2eba86e046e..0e24cd48428 100644 --- a/sdk/lib/rtl/heap.c +++ b/sdk/lib/rtl/heap.c @@ -81,6 +81,25 @@ UCHAR FillPattern[HEAP_ENTRY_SIZE] = HEAP_TAIL_FILL }; +static +BOOLEAN +RtlpIsLastCommittedEntry(PHEAP_ENTRY Entry) +{ + if (Entry->Flags & HEAP_ENTRY_LAST_ENTRY) + return TRUE; + + Entry = Entry + Entry->Size; + + /* 1-sized busy last entry are the committed range guard entries */ + if ((Entry->Flags != (HEAP_ENTRY_BUSY | HEAP_ENTRY_LAST_ENTRY)) || (Entry->Size != 1)) + return FALSE; + + /* This must be the last or the penultimate entry in the page */ + ASSERT(((PVOID)PAGE_ROUND_UP(Entry) == (Entry + 1)) || + ((PVOID)PAGE_ROUND_UP(Entry)== (Entry + 2))); + return TRUE; +} + /* FUNCTIONS *****************************************************************/ NTSTATUS NTAPI @@ -509,6 +528,8 @@ RtlpCreateUnCommittedRange(PHEAP_SEGMENT Segment) if (!NT_SUCCESS(Status)) return NULL; + ASSERT((PCHAR)UcrDescriptor == ((PCHAR)UcrSegment + UcrSegment->CommittedSize)); + /* Update sizes */ UcrSegment->CommittedSize += CommitSize; } @@ -608,42 +629,40 @@ RtlpInsertUnCommittedPages(PHEAP_SEGMENT Segment, Segment->NumberOfUnCommittedRanges++; } -PHEAP_FREE_ENTRY NTAPI +static +PHEAP_FREE_ENTRY RtlpFindAndCommitPages(PHEAP Heap, PHEAP_SEGMENT Segment, PSIZE_T Size, PVOID AddressRequested) { PLIST_ENTRY Current; - ULONG_PTR Address = 0; - PHEAP_UCR_DESCRIPTOR UcrDescriptor, PreviousUcr = NULL; - PHEAP_ENTRY FirstEntry, LastEntry; NTSTATUS Status; - DPRINT("RtlpFindAndCommitPages(%p %p %Ix %08Ix)\n", Heap, Segment, *Size, Address); + DPRINT("RtlpFindAndCommitPages(%p %p %Ix %p)\n", Heap, Segment, *Size, AddressRequested); /* Go through UCRs in a segment */ Current = Segment->UCRSegmentList.Flink; while (Current != &Segment->UCRSegmentList) { - UcrDescriptor = CONTAINING_RECORD(Current, HEAP_UCR_DESCRIPTOR, SegmentEntry); + PHEAP_UCR_DESCRIPTOR UcrDescriptor = CONTAINING_RECORD(Current, HEAP_UCR_DESCRIPTOR, SegmentEntry); /* Check if we can use that one right away */ if (UcrDescriptor->Size >= *Size && (UcrDescriptor->Address == AddressRequested || !AddressRequested)) { - /* Get the address */ - Address = (ULONG_PTR)UcrDescriptor->Address; + PHEAP_ENTRY GuardEntry, FreeEntry; + PVOID Address = UcrDescriptor->Address; /* Commit it */ if (Heap->CommitRoutine) { - Status = Heap->CommitRoutine(Heap, (PVOID *)&Address, Size); + Status = Heap->CommitRoutine(Heap, &Address, Size); } else { Status = ZwAllocateVirtualMemory(NtCurrentProcess(), - (PVOID *)&Address, + &Address, 0, Size, MEM_COMMIT, @@ -662,60 +681,67 @@ RtlpFindAndCommitPages(PHEAP Heap, /* Update tracking numbers */ Segment->NumberOfUnCommittedPages -= (ULONG)(*Size / PAGE_SIZE); - /* Calculate first and last entries */ - FirstEntry = (PHEAP_ENTRY)Address; + /* Update UCR descriptor */ + UcrDescriptor->Address = (PVOID)((ULONG_PTR)UcrDescriptor->Address + *Size); + UcrDescriptor->Size -= *Size; + + /* Grab the previous guard entry */ + GuardEntry = (PHEAP_ENTRY)Address - 1; + ASSERT(GuardEntry->Flags & HEAP_ENTRY_LAST_ENTRY); + ASSERT(GuardEntry->Flags & HEAP_ENTRY_BUSY); + ASSERT(GuardEntry->Size == 1); - LastEntry = Segment->LastEntryInSegment; - if (!(LastEntry->Flags & HEAP_ENTRY_LAST_ENTRY) || - LastEntry + LastEntry->Size != FirstEntry) + /* Did we have a double guard entry ? */ + if (GuardEntry->PreviousSize == 1) { - /* Go through the entries to find the last one */ - if (PreviousUcr) - LastEntry = (PHEAP_ENTRY)((ULONG_PTR)PreviousUcr->Address + PreviousUcr->Size); - else - LastEntry = &Segment->Entry; + /* Use the one before instead */ + GuardEntry--; - while (!(LastEntry->Flags & HEAP_ENTRY_LAST_ENTRY)) - { - ASSERT(LastEntry->Size != 0); - LastEntry += LastEntry->Size; - } + ASSERT(GuardEntry->Flags & HEAP_ENTRY_LAST_ENTRY); + ASSERT(GuardEntry->Flags & HEAP_ENTRY_BUSY); + ASSERT(GuardEntry->Size == 1); + + /* We gain one slot more */ + *Size += HEAP_ENTRY_SIZE; } - ASSERT((LastEntry + LastEntry->Size) == FirstEntry); - /* Unmark it as a last entry */ - LastEntry->Flags &= ~HEAP_ENTRY_LAST_ENTRY; + /* This will become our returned free entry. + * Now we can make it span the whole committed range. + * But we keep one slot for a guard entry, if needed. + */ + FreeEntry = GuardEntry; - /* Update UCR descriptor */ - UcrDescriptor->Address = (PVOID)((ULONG_PTR)UcrDescriptor->Address + *Size); - UcrDescriptor->Size -= *Size; + FreeEntry->Flags &= ~(HEAP_ENTRY_BUSY | HEAP_ENTRY_LAST_ENTRY); + FreeEntry->Size = (*Size) >> HEAP_ENTRY_SHIFT; DPRINT("Updating UcrDescriptor %p, new Address %p, size %lu\n", UcrDescriptor, UcrDescriptor->Address, UcrDescriptor->Size); - /* Set various first entry fields */ - FirstEntry->SegmentOffset = LastEntry->SegmentOffset; - FirstEntry->Size = (USHORT)(*Size >> HEAP_ENTRY_SHIFT); - FirstEntry->PreviousSize = LastEntry->Size; - /* Check if anything left in this UCR */ if (UcrDescriptor->Size == 0) { - /* It's fully exhausted */ + /* It's fully exhausted. Take the guard entry for us */ + FreeEntry->Size++; + *Size += HEAP_ENTRY_SIZE; + + ASSERT((FreeEntry + FreeEntry->Size) == UcrDescriptor->Address); /* Check if this is the end of the segment */ if(UcrDescriptor->Address == Segment->LastValidEntry) { - FirstEntry->Flags = HEAP_ENTRY_LAST_ENTRY; - Segment->LastEntryInSegment = FirstEntry; + FreeEntry->Flags = HEAP_ENTRY_LAST_ENTRY; } else { - FirstEntry->Flags = 0; - Segment->LastEntryInSegment = Segment->FirstEntry; - /* Update field of next entry */ - ASSERT((FirstEntry + FirstEntry->Size)->PreviousSize == 0); - (FirstEntry + FirstEntry->Size)->PreviousSize = FirstEntry->Size; + PHEAP_ENTRY NextEntry = UcrDescriptor->Address; + + /* We should not have a UCR right behind us */ + ASSERT((UcrDescriptor->SegmentEntry.Flink == &Segment->UCRSegmentList) + || (CONTAINING_RECORD(UcrDescriptor->SegmentEntry.Flink, HEAP_UCR_DESCRIPTOR, SegmentEntry)->Address > UcrDescriptor->Address)); + + ASSERT(NextEntry->PreviousSize == 0); + ASSERT(NextEntry == FreeEntry + FreeEntry->Size); + NextEntry->PreviousSize = FreeEntry->Size; } /* This UCR needs to be removed because it became useless */ @@ -726,33 +752,38 @@ RtlpFindAndCommitPages(PHEAP Heap, } else { - FirstEntry->Flags = HEAP_ENTRY_LAST_ENTRY; - Segment->LastEntryInSegment = FirstEntry; + /* Setup a guard entry */ + GuardEntry = (PHEAP_ENTRY)UcrDescriptor->Address - 1; + ASSERT(GuardEntry == FreeEntry + FreeEntry->Size); + GuardEntry->Flags = HEAP_ENTRY_LAST_ENTRY | HEAP_ENTRY_BUSY; + GuardEntry->Size = 1; + GuardEntry->PreviousSize = FreeEntry->Size; + GuardEntry->SegmentOffset = FreeEntry->SegmentOffset; + DPRINT("Setting %p as UCR guard entry.\n", GuardEntry); } /* We're done */ - return (PHEAP_FREE_ENTRY)FirstEntry; + return (PHEAP_FREE_ENTRY)FreeEntry; } /* Advance to the next descriptor */ - PreviousUcr = UcrDescriptor; Current = Current->Flink; } return NULL; } -VOID NTAPI +static +VOID RtlpDeCommitFreeBlock(PHEAP Heap, PHEAP_FREE_ENTRY FreeEntry, SIZE_T Size) { PHEAP_SEGMENT Segment; - PHEAP_ENTRY PrecedingInUseEntry = NULL, NextInUseEntry = NULL; - PHEAP_FREE_ENTRY NextFreeEntry; + PHEAP_ENTRY NextEntry, GuardEntry; PHEAP_UCR_DESCRIPTOR UcrDescriptor; - SIZE_T PrecedingSize, NextSize, DecommitSize; - ULONG_PTR DecommitBase; + SIZE_T PrecedingSize, DecommitSize; + ULONG_PTR DecommitBase, DecommitEnd; NTSTATUS Status; DPRINT("Decommitting %p %p %x\n", Heap, FreeEntry, Size); @@ -772,49 +803,44 @@ RtlpDeCommitFreeBlock(PHEAP Heap, DecommitBase = ROUND_UP(FreeEntry, PAGE_SIZE); PrecedingSize = (PHEAP_ENTRY)DecommitBase - (PHEAP_ENTRY)FreeEntry; - if (PrecedingSize == 1) + if (PrecedingSize == 0) { - /* Just 1 heap entry, increase the base/size */ + /* We need some space in order to insert our guard entry */ DecommitBase += PAGE_SIZE; PrecedingSize += PAGE_SIZE >> HEAP_ENTRY_SHIFT; } - else if (FreeEntry->PreviousSize && - (DecommitBase == (ULONG_PTR)FreeEntry)) - { - PrecedingInUseEntry = (PHEAP_ENTRY)FreeEntry - FreeEntry->PreviousSize; - } - /* Get the next entry */ - NextFreeEntry = (PHEAP_FREE_ENTRY)((PHEAP_ENTRY)FreeEntry + Size); - DecommitSize = ROUND_DOWN(NextFreeEntry, PAGE_SIZE); - NextSize = (PHEAP_ENTRY)NextFreeEntry - (PHEAP_ENTRY)DecommitSize; + /* Get the entry after this one. */ - if (NextSize == 1) + /* Do we really have a next entry */ + if (RtlpIsLastCommittedEntry((PHEAP_ENTRY)FreeEntry)) { - /* Just 1 heap entry, increase the size */ - DecommitSize -= PAGE_SIZE; - NextSize += PAGE_SIZE >> HEAP_ENTRY_SHIFT; + /* No, Decommit till the next UCR. */ + DecommitEnd = PAGE_ROUND_UP((PHEAP_ENTRY)FreeEntry + FreeEntry->Size); + NextEntry = NULL; } - else if (NextSize == 0 && - !(FreeEntry->Flags & HEAP_ENTRY_LAST_ENTRY)) + else { - NextInUseEntry = (PHEAP_ENTRY)NextFreeEntry; - } + NextEntry = (PHEAP_ENTRY)FreeEntry + Size; + DecommitEnd = PAGE_ROUND_DOWN(NextEntry); - NextFreeEntry = (PHEAP_FREE_ENTRY)((PHEAP_ENTRY)NextFreeEntry - NextSize); - - /* Calculate real decommit size */ - if (DecommitSize > DecommitBase) - { - DecommitSize -= DecommitBase; + /* Can we make a free entry out of what's left ? */ + if ((NextEntry - (PHEAP_ENTRY)DecommitEnd) == 1) + { + /* Nope. Let's keep one page before this */ + DecommitEnd -= PAGE_SIZE; + } } - else + + if (DecommitEnd <= DecommitBase) { - /* Nothing to decommit */ + /* There's nothing left to decommit. */ RtlpInsertFreeBlock(Heap, FreeEntry, Size); return; } + DecommitSize = DecommitEnd - DecommitBase; + /* A decommit is necessary. Create a UCR descriptor */ UcrDescriptor = RtlpCreateUnCommittedRange(Segment); if (!UcrDescriptor) @@ -829,6 +855,7 @@ RtlpDeCommitFreeBlock(PHEAP Heap, (PVOID *)&DecommitBase, &DecommitSize, MEM_DECOMMIT); + ASSERT((DecommitBase + DecommitSize) == DecommitEnd); /* Delete that UCR. This is needed to assure there is an unused UCR entry in the list */ RtlpDestroyUnCommittedRange(Segment, UcrDescriptor); @@ -843,47 +870,74 @@ RtlpDeCommitFreeBlock(PHEAP Heap, RtlpInsertUnCommittedPages(Segment, DecommitBase, DecommitSize); Segment->NumberOfUnCommittedPages += (ULONG)(DecommitSize / PAGE_SIZE); - if (PrecedingSize) - { - /* Adjust size of this free entry and insert it */ - FreeEntry->Flags = HEAP_ENTRY_LAST_ENTRY; - FreeEntry->Size = (USHORT)PrecedingSize; - Heap->TotalFreeSize += PrecedingSize; - Segment->LastEntryInSegment = FreeEntry; - - /* Insert it into the free list */ - RtlpInsertFreeBlockHelper(Heap, FreeEntry, PrecedingSize, FALSE); - } - else if (PrecedingInUseEntry) - { - /* Adjust preceding in use entry */ - PrecedingInUseEntry->Flags |= HEAP_ENTRY_LAST_ENTRY; - Segment->LastEntryInSegment = PrecedingInUseEntry; - } - else if ((ULONG_PTR)Segment->LastEntryInSegment >= DecommitBase && - (ULONG_PTR)Segment->LastEntryInSegment < DecommitBase + DecommitSize) - { - /* Invalidate last entry */ - Segment->LastEntryInSegment = Segment->FirstEntry; + /* Insert our guard entry before this */ + GuardEntry = (PHEAP_ENTRY)DecommitBase - 1; + GuardEntry->Size = 1; + GuardEntry->Flags = HEAP_ENTRY_BUSY | HEAP_ENTRY_LAST_ENTRY; + GuardEntry->SegmentOffset = FreeEntry->SegmentOffset; + DPRINT("Setting %p as UCR guard entry.\n", GuardEntry); + + /* Now see what's really behind us */ + PrecedingSize--; + switch (PrecedingSize) + { + case 1: + /* No space left for a free entry. Make this another guard entry */ + GuardEntry->PreviousSize = 1; + GuardEntry--; + GuardEntry->Size = 1; + GuardEntry->Flags = HEAP_ENTRY_BUSY | HEAP_ENTRY_LAST_ENTRY; + GuardEntry->SegmentOffset = FreeEntry->SegmentOffset; + /* Fall-through */ + case 0: + /* There was just enough space four our guard entry */ + ASSERT((PHEAP_ENTRY)FreeEntry == GuardEntry); + GuardEntry->PreviousSize = FreeEntry->PreviousSize; + break; + default: + /* We can insert this as a free entry */ + GuardEntry->PreviousSize = PrecedingSize; + FreeEntry->Size = PrecedingSize; + FreeEntry->Flags &= ~HEAP_ENTRY_LAST_ENTRY; + FreeEntry = RtlpCoalesceFreeBlocks(Heap, FreeEntry, &PrecedingSize, FALSE); + RtlpInsertFreeBlock(Heap, FreeEntry, PrecedingSize); + break; } /* Now the next one */ - if (NextSize) + if (NextEntry) { - /* Adjust size of this free entry and insert it */ - NextFreeEntry->Flags = 0; - NextFreeEntry->PreviousSize = 0; - NextFreeEntry->SegmentOffset = Segment->Entry.SegmentOffset; - NextFreeEntry->Size = (USHORT)NextSize; + ASSERT((PHEAP_ENTRY)DecommitEnd <= NextEntry); - ((PHEAP_FREE_ENTRY)((PHEAP_ENTRY)NextFreeEntry + NextSize))->PreviousSize = (USHORT)NextSize; + SIZE_T NextSize = NextEntry - (PHEAP_ENTRY)DecommitEnd; + if (NextSize) + { + PHEAP_FREE_ENTRY NextFreeEntry = (PHEAP_FREE_ENTRY)DecommitEnd; - Heap->TotalFreeSize += NextSize; - RtlpInsertFreeBlockHelper(Heap, NextFreeEntry, NextSize, FALSE); - } - else if (NextInUseEntry) - { - NextInUseEntry->PreviousSize = 0; + /* Make sure this is all valid */ + ASSERT((PHEAP_ENTRY)DecommitEnd < Segment->LastValidEntry); + ASSERT(NextSize >= 2); + + /* Adjust size of this free entry and insert it */ + NextFreeEntry->Flags = 0; + NextFreeEntry->PreviousSize = 0; + NextFreeEntry->SegmentOffset = Segment->Entry.SegmentOffset; + NextFreeEntry->Size = (USHORT)NextSize; + + NextEntry->PreviousSize = NextSize; + ASSERT(NextEntry == (PHEAP_ENTRY)NextFreeEntry + NextFreeEntry->Size); + + NextFreeEntry = RtlpCoalesceFreeBlocks(Heap, NextFreeEntry, &NextSize, FALSE); + RtlpInsertFreeBlock(Heap, NextFreeEntry, NextSize); + } + else + { + /* This one must be at the beginning of a page */ + ASSERT(NextEntry == (PHEAP_ENTRY)PAGE_ROUND_DOWN(NextEntry)); + /* And we must have a gap betwwen */ + ASSERT(NextEntry > (PHEAP_ENTRY)DecommitBase); + NextEntry->PreviousSize = 0; + } } } @@ -896,8 +950,6 @@ RtlpInitializeHeapSegment(IN OUT PHEAP Heap, IN SIZE_T SegmentReserve, IN SIZE_T SegmentCommit) { - PHEAP_ENTRY HeapEntry; - /* Preconditions */ ASSERT(Heap != NULL); ASSERT(Segment != NULL); @@ -936,26 +988,68 @@ RtlpInitializeHeapSegment(IN OUT PHEAP Heap, Segment->FirstEntry = &Segment->Entry + Segment->Entry.Size; Segment->LastValidEntry = (PHEAP_ENTRY)((ULONG_PTR)Segment + SegmentReserve); + /* Initialise the Heap Segment UnCommitted Range information */ + Segment->NumberOfUnCommittedPages = (ULONG)((SegmentReserve - SegmentCommit) >> PAGE_SHIFT); + Segment->NumberOfUnCommittedRanges = 0; + InitializeListHead(&Segment->UCRSegmentList); + + /* We must have space for a guard entry ! */ + ASSERT (((SegmentCommit >> HEAP_ENTRY_SHIFT) > Segment->Entry.Size) || (Segment->NumberOfUnCommittedPages == 0)); + if (((SIZE_T)Segment->Entry.Size << HEAP_ENTRY_SHIFT) < SegmentCommit) { - HeapEntry = Segment->FirstEntry; + PHEAP_ENTRY FreeEntry = NULL; - /* Prepare a Free Heap Entry header */ - HeapEntry->Flags = HEAP_ENTRY_LAST_ENTRY; - HeapEntry->PreviousSize = Segment->Entry.Size; - HeapEntry->SegmentOffset = SegmentIndex; + if (Segment->NumberOfUnCommittedPages != 0) + { + /* Ensure we put our guard entry at the end of the last committed page */ + PHEAP_ENTRY GuardEntry = &Segment->Entry + (SegmentCommit >> HEAP_ENTRY_SHIFT) - 1; - /* Register the Free Heap Entry */ - RtlpInsertFreeBlock(Heap, (PHEAP_FREE_ENTRY) HeapEntry, (SegmentCommit >> HEAP_ENTRY_SHIFT) - Segment->Entry.Size); - } + ASSERT(GuardEntry > &Segment->Entry); + GuardEntry->Size = 1; + GuardEntry->Flags = HEAP_ENTRY_BUSY | HEAP_ENTRY_LAST_ENTRY; + GuardEntry->SegmentOffset = SegmentIndex; + GuardEntry->PreviousSize = GuardEntry - Segment->FirstEntry; - /* Always point to a valid entry */ - Segment->LastEntryInSegment = Segment->FirstEntry; + /* Chack what is left behind us */ + switch (GuardEntry->PreviousSize) + { + case 1: + /* There is not enough space for a free entry. Double the guard entry */ + GuardEntry--; + GuardEntry->Size = 1; + GuardEntry->Flags = HEAP_ENTRY_BUSY | HEAP_ENTRY_LAST_ENTRY; + GuardEntry->SegmentOffset = SegmentIndex; + DPRINT1("Setting %p as UCR guard entry.\n", GuardEntry); + /* Fall through */ + case 0: + ASSERT(GuardEntry == Segment->FirstEntry); + GuardEntry->PreviousSize = Segment->Entry.Size; + break; + default: + /* There will be a free entry between the segment and the guard entry */ + FreeEntry = Segment->FirstEntry; + FreeEntry->PreviousSize = Segment->Entry.Size; + FreeEntry->SegmentOffset = SegmentIndex; + FreeEntry->Size = GuardEntry->PreviousSize; + FreeEntry->Flags = 0; + break; + } + } + else + { + /* Prepare a Free Heap Entry header */ + FreeEntry = Segment->FirstEntry; + FreeEntry->PreviousSize = Segment->Entry.Size; + FreeEntry->SegmentOffset = SegmentIndex; + FreeEntry->Flags = HEAP_ENTRY_LAST_ENTRY; + FreeEntry->Size = (SegmentCommit >> HEAP_ENTRY_SHIFT) - Segment->Entry.Size; + } - /* Initialise the Heap Segment UnCommitted Range information */ - Segment->NumberOfUnCommittedPages = (ULONG)((SegmentReserve - SegmentCommit) >> PAGE_SHIFT); - Segment->NumberOfUnCommittedRanges = 0; - InitializeListHead(&Segment->UCRSegmentList); + /* Register the Free Heap Entry */ + if (FreeEntry) + RtlpInsertFreeBlock(Heap, (PHEAP_FREE_ENTRY)FreeEntry, FreeEntry->Size); + } /* Register the UnCommitted Range of the Heap Segment */ if (Segment->NumberOfUnCommittedPages != 0) @@ -1046,7 +1140,6 @@ RtlpCoalesceFreeBlocks (PHEAP Heap, { SegmentOffset = FreeEntry->SegmentOffset; ASSERT(SegmentOffset < HEAP_SEGMENTS); - Heap->Segments[SegmentOffset]->LastEntryInSegment = FreeEntry; } } @@ -1087,7 +1180,6 @@ RtlpCoalesceFreeBlocks (PHEAP Heap, { SegmentOffset = FreeEntry->SegmentOffset; ASSERT(SegmentOffset < HEAP_SEGMENTS); - Heap->Segments[SegmentOffset]->LastEntryInSegment = FreeEntry; } } } @@ -1785,7 +1877,6 @@ RtlpSplitEntry(PHEAP Heap, { SegmentOffset = SplitBlock->SegmentOffset; ASSERT(SegmentOffset < HEAP_SEGMENTS); - Heap->Segments[SegmentOffset]->LastEntryInSegment = SplitBlock; } } } @@ -1956,10 +2047,8 @@ RtlAllocateHeap(IN PVOID HeapPtr, IN SIZE_T Size) { PHEAP Heap = (PHEAP)HeapPtr; - PULONG FreeListsInUse; - ULONG FreeListsInUseUlong; SIZE_T AllocationSize; - SIZE_T Index, InUseIndex, i; + SIZE_T Index; PLIST_ENTRY FreeListHead; PHEAP_ENTRY InUseEntry; PHEAP_FREE_ENTRY FreeBlock; @@ -2053,34 +2142,34 @@ RtlAllocateHeap(IN PVOID HeapPtr, else { /* Find smallest free block which this request could fit in */ - InUseIndex = Index >> 5; - FreeListsInUse = &Heap->u.FreeListsInUseUlong[InUseIndex]; - - /* This bit magic disables all sizes which are less than the requested allocation size */ - FreeListsInUseUlong = *FreeListsInUse++ & ~((1 << ((ULONG)Index & 0x1f)) - 1); - - /* If size is definitily more than our lists - go directly to the non-dedicated one */ - if (InUseIndex > 3) - return RtlpAllocateNonDedicated(Heap, Flags, Size, AllocationSize, Index, HeapLocked); - - /* Go through the list */ - for (i = InUseIndex; i < 4; i++) + ULONG InUseIndex = Index >> 5; + ULONG InUseMask; + ULONG Bit; + + /* Sanity check */ + ASSERT(InUseIndex < ARRAYSIZE(Heap->u.FreeListsInUseUlong)); + + /* Now check if there is a free entry for us. Beware of getting the right bit mask for the first iteration. */ + InUseMask = ~((1UL << (Index & 0x1F)) - 1); + InUseMask &= Heap->u.FreeListsInUseUlong[InUseIndex]; + DPRINT("InUseIndex %u, InUseMask %x, Index %u\n", InUseIndex, InUseMask, Index); + while (!BitScanForward(&Bit, InUseMask)) { - if (FreeListsInUseUlong) + InUseIndex++; + if (InUseIndex == ARRAYSIZE(Heap->u.FreeListsInUseUlong)) { - FreeListHead = &Heap->FreeLists[i * 32]; - break; + /* No luck this time. Go the dedicated way */ + return RtlpAllocateNonDedicated(Heap, Flags, Size, AllocationSize, Index, HeapLocked); } - - if (i < 3) FreeListsInUseUlong = *FreeListsInUse++; + InUseMask = Heap->u.FreeListsInUseUlong[InUseIndex]; } - /* Nothing found, search in the non-dedicated list */ - if (i == 4) - return RtlpAllocateNonDedicated(Heap, Flags, Size, AllocationSize, Index, HeapLocked); + /* Of course we must be in a list for entries bigger than what we were looking for in the first place */ + DPRINT("InUseIndex %u, Bit %u, Index %u\n", InUseIndex, Bit, Index); + ASSERT(((InUseIndex << 5) + Bit) > Index); + FreeListHead = &Heap->FreeLists[(InUseIndex << 5) + Bit]; - /* That list is found, now calculate exact block */ - FreeListHead += RtlpFindLeastSetBit(FreeListsInUseUlong); + ASSERT(!IsListEmpty(FreeListHead)); /* Take this entry and remove it from the list of free blocks */ FreeBlock = CONTAINING_RECORD(FreeListHead->Blink, @@ -2293,31 +2382,16 @@ BOOLEAN NTAPI RtlFreeHeap( FALSE); } - /* If there is no need to decommit the block - put it into a free list */ - if (BlockSize < Heap->DeCommitFreeBlockThreshold || - (Heap->TotalFreeSize + BlockSize < Heap->DeCommitTotalFreeThreshold)) + /* See if we should decommit this block */ + if ((BlockSize >= Heap->DeCommitFreeBlockThreshold) || + (Heap->TotalFreeSize + BlockSize >= Heap->DeCommitTotalFreeThreshold)) { - /* Check if it needs to go to a 0 list */ - if (BlockSize > HEAP_MAX_BLOCK_SIZE) - { - /* General-purpose 0 list */ - RtlpInsertFreeBlock(Heap, (PHEAP_FREE_ENTRY)HeapEntry, BlockSize); - } - else - { - /* Usual free list */ - RtlpInsertFreeBlockHelper(Heap, (PHEAP_FREE_ENTRY)HeapEntry, BlockSize, FALSE); - - /* Assert sizes are consistent */ - if (!(HeapEntry->Flags & HEAP_ENTRY_LAST_ENTRY)) - { - ASSERT((HeapEntry + BlockSize)->PreviousSize == BlockSize); - } - - /* Increase the free size */ - Heap->TotalFreeSize += BlockSize; - } - + RtlpDeCommitFreeBlock(Heap, (PHEAP_FREE_ENTRY)HeapEntry, BlockSize); + } + else + { + /* Insert into the free list */ + RtlpInsertFreeBlock(Heap, (PHEAP_FREE_ENTRY)HeapEntry, BlockSize); if (RtlpGetMode() == UserMode && TagIndex != 0) @@ -2326,11 +2400,6 @@ BOOLEAN NTAPI RtlFreeHeap( UNIMPLEMENTED; } } - else - { - /* Decommit this block */ - RtlpDeCommitFreeBlock(Heap, (PHEAP_FREE_ENTRY)HeapEntry, BlockSize); - } } /* Release the heap lock */ @@ -2359,10 +2428,7 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, /* Get entry flags */ EntryFlags = InUseEntry->Flags; - /* Get the next free entry */ - FreeEntry = (PHEAP_FREE_ENTRY)(InUseEntry + InUseEntry->Size); - - if (EntryFlags & HEAP_ENTRY_LAST_ENTRY) + if (RtlpIsLastCommittedEntry(InUseEntry)) { /* There is no next block, just uncommitted space. Calculate how much is needed */ FreeSize = (Index - InUseEntry->Size) << HEAP_ENTRY_SHIFT; @@ -2372,7 +2438,7 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, FreeEntry = RtlpFindAndCommitPages(Heap, Heap->Segments[InUseEntry->SegmentOffset], &FreeSize, - FreeEntry); + (PVOID)PAGE_ROUND_UP(InUseEntry + InUseEntry->Size)); /* Fail if it failed... */ if (!FreeEntry) return FALSE; @@ -2398,6 +2464,8 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, } else { + FreeEntry = (PHEAP_FREE_ENTRY)(InUseEntry + InUseEntry->Size); + /* The next block indeed exists. Check if it's free or in use */ if (FreeEntry->Flags & HEAP_ENTRY_BUSY) return FALSE; @@ -2456,7 +2524,6 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, { SegmentOffset = InUseEntry->SegmentOffset; ASSERT(SegmentOffset < HEAP_SEGMENTS); - Heap->Segments[SegmentOffset]->LastEntryInSegment = InUseEntry; } } else @@ -2472,7 +2539,6 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, { SegmentOffset = UnusedEntry->SegmentOffset; ASSERT(SegmentOffset < HEAP_SEGMENTS); - Heap->Segments[SegmentOffset]->LastEntryInSegment = UnusedEntry; /* Set flags and size */ UnusedEntry->Flags = RememberFlags; @@ -2527,7 +2593,6 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, { SegmentOffset = UnusedEntry->SegmentOffset; ASSERT(SegmentOffset < HEAP_SEGMENTS); - Heap->Segments[SegmentOffset]->LastEntryInSegment = UnusedEntry; } /* Insert it back and update total size */ @@ -2851,7 +2916,6 @@ RtlReAllocateHeap(HANDLE HeapPtr, { SegmentOffset = SplitBlock->SegmentOffset; ASSERT(SegmentOffset < HEAP_SEGMENTS); - Heap->Segments[SegmentOffset]->LastEntryInSegment = SplitBlock; /* Set its size and insert it to the list */ SplitBlock->Size = (USHORT)FreeSize; @@ -2904,7 +2968,6 @@ RtlReAllocateHeap(HANDLE HeapPtr, { SegmentOffset = SplitBlock->SegmentOffset; ASSERT(SegmentOffset < HEAP_SEGMENTS); - Heap->Segments[SegmentOffset]->LastEntryInSegment = SplitBlock; } /* Insert the new one back and update total size */ diff --git a/sdk/lib/rtl/heap.h b/sdk/lib/rtl/heap.h index aef68e5edcd..881897d589c 100644 --- a/sdk/lib/rtl/heap.h +++ b/sdk/lib/rtl/heap.h @@ -144,6 +144,7 @@ C_ASSERT(sizeof(HEAP_ENTRY) == 16); C_ASSERT(sizeof(HEAP_ENTRY) == 8); #endif C_ASSERT((1 << HEAP_ENTRY_SHIFT) == sizeof(HEAP_ENTRY)); +C_ASSERT((2 << HEAP_ENTRY_SHIFT) == sizeof(HEAP_FREE_ENTRY)); typedef struct _HEAP_TAG_ENTRY { @@ -217,8 +218,7 @@ typedef struct _HEAP_LIST_LOOKUP ULONG NumberOfUnCommittedRanges; \ USHORT SegmentAllocatorBackTraceIndex; \ USHORT Reserved; \ - LIST_ENTRY UCRSegmentList; \ - PVOID LastEntryInSegment //FIXME: non-Vista + LIST_ENTRY UCRSegmentList typedef struct _HEAP {
3 years, 9 months
1
0
0
0
[reactos] 03/03: [UMPNPMGR][USETUP] Use PlugPlayControlStartDevice in usetup and umpnpmgr
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=abbc5ba45a2072e4e3e56…
commit abbc5ba45a2072e4e3e56fd6596955be1c579fdb Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Tue Mar 16 02:25:09 2021 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Tue Mar 16 03:17:58 2021 +0300 [UMPNPMGR][USETUP] Use PlugPlayControlStartDevice in usetup and umpnpmgr Instead of PlugPlayControlResetDevice, PlugPlayControlStartDevice should be used for a newly installed device. For usetup, add a device status check before starting attempt, so we're not touching devices which are already started. CORE-17463 CORE-17490 --- base/services/umpnpmgr/rpcserver.c | 9 +++------ base/setup/usetup/devinst.c | 38 ++++++++++++++++++++++++++++---------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c index cf9ba100f1b..cf49713061a 100644 --- a/base/services/umpnpmgr/rpcserver.c +++ b/base/services/umpnpmgr/rpcserver.c @@ -3081,17 +3081,14 @@ static CONFIGRET EnableDeviceInstance( _In_ LPWSTR pszDeviceInstance) { - PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData; + PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ControlData; CONFIGRET ret = CR_SUCCESS; NTSTATUS Status; DPRINT("Enable device instance %S\n", pszDeviceInstance); - RtlInitUnicodeString(&ResetDeviceData.DeviceInstance, - pszDeviceInstance); - Status = NtPlugPlayControl(PlugPlayControlResetDevice, - &ResetDeviceData, - sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)); + RtlInitUnicodeString(&ControlData.DeviceInstance, pszDeviceInstance); + Status = NtPlugPlayControl(PlugPlayControlStartDevice, &ControlData, sizeof(ControlData)); if (!NT_SUCCESS(Status)) ret = NtStatusToCrError(Status); diff --git a/base/setup/usetup/devinst.c b/base/setup/usetup/devinst.c index 80d93ce1d51..eee7c25b4ec 100644 --- a/base/setup/usetup/devinst.c +++ b/base/setup/usetup/devinst.c @@ -39,20 +39,25 @@ typedef struct /* FUNCTIONS ****************************************************************/ static BOOLEAN -ResetDevice( - IN LPCWSTR DeviceId) +AreDriversLoaded( + IN PCWSTR DeviceId) { - PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData; + PLUGPLAY_CONTROL_STATUS_DATA PlugPlayData; NTSTATUS Status; - RtlInitUnicodeString(&ResetDeviceData.DeviceInstance, DeviceId); - Status = NtPlugPlayControl(PlugPlayControlResetDevice, &ResetDeviceData, sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)); - if (!NT_SUCCESS(Status)) + RtlInitUnicodeString(&PlugPlayData.DeviceInstance, DeviceId); + PlugPlayData.Operation = PNP_GET_DEVICE_STATUS; + + Status = NtPlugPlayControl(PlugPlayControlDeviceStatus, &PlugPlayData, sizeof(PlugPlayData)); + if (NT_SUCCESS(Status)) + { + return (_Bool)((PlugPlayData.DeviceStatus & DN_DRIVER_LOADED) && + !(PlugPlayData.DeviceStatus & DN_HAS_PROBLEM)); + } + else { - DPRINT1("NtPlugPlayControl() failed with status 0x%08x\n", Status); return FALSE; } - return TRUE; } static BOOLEAN @@ -81,6 +86,10 @@ InstallDriver( NTSTATUS Status; BOOLEAN deviceInstalled = FALSE; + /* First check if the driver needs any action at all */ + if (AreDriversLoaded(DeviceId)) + return TRUE; + /* Check if we know the hardware */ if (!SpInfFindFirstLine(hInf, L"HardwareIdsDatabase", HardwareId, &Context)) return FALSE; @@ -190,8 +199,17 @@ InstallDriver( (wcslen(Driver) + 1) * sizeof(WCHAR)); if (NT_SUCCESS(Status)) { - /* Restart the device, so it will use the driver we registered */ - deviceInstalled = ResetDevice(DeviceId); + /* We've registered the driver, time to start a device */ + PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ControlData; + RtlInitUnicodeString(&ControlData.DeviceInstance, DeviceId); + + Status = NtPlugPlayControl(PlugPlayControlStartDevice, &ControlData, sizeof(ControlData)); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtPlugPlayControl() failed with status 0x%08x\n", Status); + } + + deviceInstalled = NT_SUCCESS(Status); } INF_FreeData(Driver);
3 years, 9 months
1
0
0
0
[reactos] 02/03: [NTOS:PNP] Implement PlugPlayControlStartDevice control class
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=59a5dba443eaafd7b34d7…
commit 59a5dba443eaafd7b34d7a7920912b3e18b1b2eb Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Tue Mar 16 02:17:14 2021 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Tue Mar 16 03:17:57 2021 +0300 [NTOS:PNP] Implement PlugPlayControlStartDevice control class This control class is triggered when a driver is being installed for a non-critical device. The driver info should already be in the registry so we just need to push the device through the state graph Meanwhile, combine the code for similar control classes into PiControlSyncDeviceAction routine CORE-17463 CORE-17490 --- ntoskrnl/include/internal/io.h | 3 +- ntoskrnl/io/pnpmgr/devaction.c | 18 +++++++++ ntoskrnl/io/pnpmgr/plugplay.c | 90 +++++++++++++++++++----------------------- 3 files changed, 60 insertions(+), 51 deletions(-) diff --git a/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h index 269264b9e27..5e84f8e120f 100644 --- a/ntoskrnl/include/internal/io.h +++ b/ntoskrnl/include/internal/io.h @@ -534,7 +534,8 @@ typedef enum _DEVICE_ACTION PiActionEnumDeviceTree, PiActionEnumRootDevices, PiActionResetDevice, - PiActionAddBootDevices + PiActionAddBootDevices, + PiActionStartDevice } DEVICE_ACTION; // diff --git a/ntoskrnl/io/pnpmgr/devaction.c b/ntoskrnl/io/pnpmgr/devaction.c index 7bf77afae3e..5d354ddc62c 100644 --- a/ntoskrnl/io/pnpmgr/devaction.c +++ b/ntoskrnl/io/pnpmgr/devaction.c @@ -2482,6 +2482,8 @@ ActionToStr( return "PiActionResetDevice"; case PiActionAddBootDevices: return "PiActionAddBootDevices"; + case PiActionStartDevice: + return "PiActionStartDevice"; default: return "(request unknown)"; } @@ -2540,6 +2542,22 @@ PipDeviceActionWorker( status = STATUS_SUCCESS; break; + case PiActionStartDevice: + // This action is triggered from usermode, when a driver is installed + // for a non-critical PDO + if (deviceNode->State == DeviceNodeInitialized && + !(deviceNode->Flags & DNF_HAS_PROBLEM)) + { + PiDevNodeStateMachine(deviceNode); + } + else + { + DPRINT1("NOTE: attempt to start an already started/uninitialized device %wZ\n", + &deviceNode->InstancePath); + status = STATUS_UNSUCCESSFUL; + } + break; + default: DPRINT1("Unimplemented device action %u\n", Request->Action); status = STATUS_NOT_IMPLEMENTED; diff --git a/ntoskrnl/io/pnpmgr/plugplay.c b/ntoskrnl/io/pnpmgr/plugplay.c index 6c0e84fdb92..28e243dcd79 100644 --- a/ntoskrnl/io/pnpmgr/plugplay.c +++ b/ntoskrnl/io/pnpmgr/plugplay.c @@ -186,40 +186,6 @@ IopCaptureUnicodeString(PUNICODE_STRING DstName, PUNICODE_STRING SrcName) return Status; } -static NTSTATUS -IopPnpEnumerateDevice(PPLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA DeviceData) -{ - PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceInstance; - NTSTATUS Status = STATUS_SUCCESS; - - Status = IopCaptureUnicodeString(&DeviceInstance, &DeviceData->DeviceInstance); - if (!NT_SUCCESS(Status)) - { - return Status; - } - - DPRINT("IopPnpEnumerateDevice(%wZ)\n", &DeviceInstance); - - /* Get the device object */ - DeviceObject = IopGetDeviceObjectFromDeviceInstance(&DeviceInstance); - if (DeviceInstance.Buffer != NULL) - { - ExFreePool(DeviceInstance.Buffer); - } - if (DeviceObject == NULL) - { - return STATUS_NO_SUCH_DEVICE; - } - - Status = PiPerformSyncDeviceAction(DeviceObject, PiActionEnumDeviceTree); - - ObDereferenceObject(DeviceObject); - - return Status; -} - - /* * Remove the current PnP event from the tail of the event queue * and signal IopPnpNotifyEvent if there is yet another event in the queue. @@ -1042,23 +1008,26 @@ IopGetDeviceDepth(PPLUGPLAY_CONTROL_DEPTH_DATA DepthData) return Status; } - -static NTSTATUS -IopResetDevice(PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData) +static +NTSTATUS +PiControlSyncDeviceAction( + _In_ PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA DeviceData, + _In_ PLUGPLAY_CONTROL_CLASS ControlClass) { PDEVICE_OBJECT DeviceObject; NTSTATUS Status; UNICODE_STRING DeviceInstance; - Status = IopCaptureUnicodeString(&DeviceInstance, &ResetDeviceData->DeviceInstance); + ASSERT(ControlClass == PlugPlayControlEnumerateDevice || + ControlClass == PlugPlayControlStartDevice || + ControlClass == PlugPlayControlResetDevice); + + Status = IopCaptureUnicodeString(&DeviceInstance, &DeviceData->DeviceInstance); if (!NT_SUCCESS(Status)) { return Status; } - DPRINT("IopResetDevice(%wZ)\n", &DeviceInstance); - - /* Get the device object */ DeviceObject = IopGetDeviceObjectFromDeviceInstance(&DeviceInstance); if (DeviceInstance.Buffer != NULL) { @@ -1069,7 +1038,25 @@ IopResetDevice(PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData) return STATUS_NO_SUCH_DEVICE; } - Status = PiPerformSyncDeviceAction(DeviceObject, PiActionResetDevice); + DEVICE_ACTION Action; + + switch (ControlClass) + { + case PlugPlayControlEnumerateDevice: + Action = PiActionEnumDeviceTree; + break; + case PlugPlayControlStartDevice: + Action = PiActionStartDevice; + break; + case PlugPlayControlResetDevice: + Action = PiActionResetDevice; + break; + default: + UNREACHABLE; + break; + } + + Status = PiPerformSyncDeviceAction(DeviceObject, Action); ObDereferenceObject(DeviceObject); @@ -1309,12 +1296,21 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass, case PlugPlayControlEnumerateDevice: if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA)) return STATUS_INVALID_PARAMETER; - return IopPnpEnumerateDevice((PPLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA)Buffer); + // the Flags field is not used anyway + return PiControlSyncDeviceAction((PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)Buffer, + PlugPlayControlClass); // case PlugPlayControlRegisterNewDevice: // case PlugPlayControlDeregisterDevice: // case PlugPlayControlInitializeDevice: -// case PlugPlayControlStartDevice: + + case PlugPlayControlStartDevice: + case PlugPlayControlResetDevice: + if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)) + return STATUS_INVALID_PARAMETER; + return PiControlSyncDeviceAction((PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)Buffer, + PlugPlayControlClass); + // case PlugPlayControlUnlockDevice: // case PlugPlayControlQueryAndRemoveDevice: @@ -1362,12 +1358,6 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass, // case PlugPlayControlTargetDeviceRelation: // case PlugPlayControlQueryConflictList: // case PlugPlayControlRetrieveDock: - - case PlugPlayControlResetDevice: - if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)) - return STATUS_INVALID_PARAMETER; - return IopResetDevice((PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)Buffer); - // case PlugPlayControlHaltDevice: // case PlugPlayControlGetBlockedDriverList:
3 years, 9 months
1
0
0
0
[reactos] 01/03: [NDK] Change the data structure for PlugPlayControlResetDevice control class
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=029accdcf7ccf25b7cb0d…
commit 029accdcf7ccf25b7cb0d875fe065913ddc4d50f Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Tue Feb 23 04:24:41 2021 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Tue Mar 16 03:17:42 2021 +0300 [NDK] Change the data structure for PlugPlayControlResetDevice control class PlugPlayControlResetDevice shares the input structure with several other control classes. Source: ProcessHacker sources
https://github.com/processhacker/phnt/blob/e9c8121f41b00cd24e31eb466c979578…
--- base/services/umpnpmgr/rpcserver.c | 4 ++-- base/setup/usetup/devinst.c | 4 ++-- ntoskrnl/io/pnpmgr/plugplay.c | 6 +++--- sdk/include/ndk/cmtypes.h | 38 ++++++++++++++++++++++---------------- 4 files changed, 29 insertions(+), 23 deletions(-) diff --git a/base/services/umpnpmgr/rpcserver.c b/base/services/umpnpmgr/rpcserver.c index 1d14d978ab0..cf9ba100f1b 100644 --- a/base/services/umpnpmgr/rpcserver.c +++ b/base/services/umpnpmgr/rpcserver.c @@ -3081,7 +3081,7 @@ static CONFIGRET EnableDeviceInstance( _In_ LPWSTR pszDeviceInstance) { - PLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData; + PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData; CONFIGRET ret = CR_SUCCESS; NTSTATUS Status; @@ -3091,7 +3091,7 @@ EnableDeviceInstance( pszDeviceInstance); Status = NtPlugPlayControl(PlugPlayControlResetDevice, &ResetDeviceData, - sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA)); + sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)); if (!NT_SUCCESS(Status)) ret = NtStatusToCrError(Status); diff --git a/base/setup/usetup/devinst.c b/base/setup/usetup/devinst.c index 81eb382f5fb..80d93ce1d51 100644 --- a/base/setup/usetup/devinst.c +++ b/base/setup/usetup/devinst.c @@ -42,11 +42,11 @@ static BOOLEAN ResetDevice( IN LPCWSTR DeviceId) { - PLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData; + PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData; NTSTATUS Status; RtlInitUnicodeString(&ResetDeviceData.DeviceInstance, DeviceId); - Status = NtPlugPlayControl(PlugPlayControlResetDevice, &ResetDeviceData, sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA)); + Status = NtPlugPlayControl(PlugPlayControlResetDevice, &ResetDeviceData, sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)); if (!NT_SUCCESS(Status)) { DPRINT1("NtPlugPlayControl() failed with status 0x%08x\n", Status); diff --git a/ntoskrnl/io/pnpmgr/plugplay.c b/ntoskrnl/io/pnpmgr/plugplay.c index 66c1da7fde1..6c0e84fdb92 100644 --- a/ntoskrnl/io/pnpmgr/plugplay.c +++ b/ntoskrnl/io/pnpmgr/plugplay.c @@ -1044,7 +1044,7 @@ IopGetDeviceDepth(PPLUGPLAY_CONTROL_DEPTH_DATA DepthData) static NTSTATUS -IopResetDevice(PPLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData) +IopResetDevice(PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData) { PDEVICE_OBJECT DeviceObject; NTSTATUS Status; @@ -1364,9 +1364,9 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass, // case PlugPlayControlRetrieveDock: case PlugPlayControlResetDevice: - if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA)) + if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)) return STATUS_INVALID_PARAMETER; - return IopResetDevice((PPLUGPLAY_CONTROL_RESET_DEVICE_DATA)Buffer); + return IopResetDevice((PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)Buffer); // case PlugPlayControlHaltDevice: // case PlugPlayControlGetBlockedDriverList: diff --git a/sdk/include/ndk/cmtypes.h b/sdk/include/ndk/cmtypes.h index d5cbced0aea..7448c7d19be 100644 --- a/sdk/include/ndk/cmtypes.h +++ b/sdk/include/ndk/cmtypes.h @@ -453,14 +453,26 @@ typedef struct _PLUGPLAY_EVENT_BLOCK // Plug and Play Control Classes // -// Class 0x00 +// PlugPlayControlEnumerateDevice (0x00) typedef struct _PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA { UNICODE_STRING DeviceInstance; ULONG Flags; } PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA, *PPLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA; -// Class 0x06 +// PlugPlayControlRegisterNewDevice (0x1) +// PlugPlayControlDeregisterDevice (0x2) +// PlugPlayControlInitializeDevice (0x3) +// PlugPlayControlStartDevice (0x4) +// PlugPlayControlUnlockDevice (0x5) +// PlugPlayControlResetDevice (0x14) +// PlugPlayControlHaltDevice (0x15) +typedef struct _PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA +{ + UNICODE_STRING DeviceInstance; +} PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA, *PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA; + +// PlugPlayControlQueryAndRemoveDevice (0x06) typedef struct _PLUGPLAY_CONTROL_QUERY_REMOVE_DATA { UNICODE_STRING DeviceInstance; @@ -470,7 +482,7 @@ typedef struct _PLUGPLAY_CONTROL_QUERY_REMOVE_DATA ULONG NameLength; } PLUGPLAY_CONTROL_QUERY_REMOVE_DATA, *PPLUGPLAY_CONTROL_QUERY_REMOVE_DATA; -// Class 0x07 +// PlugPlayControlUserResponse (0x07) typedef struct _PLUGPLAY_CONTROL_USER_RESPONSE_DATA { ULONG Unknown1; @@ -479,7 +491,7 @@ typedef struct _PLUGPLAY_CONTROL_USER_RESPONSE_DATA ULONG Unknown4; } PLUGPLAY_CONTROL_USER_RESPONSE_DATA, *PPLUGPLAY_CONTROL_USER_RESPONSE_DATA; -// Class 0x09 +// PlugPlayControlGetInterfaceDeviceList (0x09) typedef struct _PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA { UNICODE_STRING DeviceInstance; @@ -489,7 +501,7 @@ typedef struct _PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA ULONG BufferSize; } PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA, *PPLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA; -//Class 0x0A +// PlugPlayControlProperty (0x0A) typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA { UNICODE_STRING DeviceInstance; @@ -498,7 +510,7 @@ typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA ULONG BufferSize; } PLUGPLAY_CONTROL_PROPERTY_DATA, *PPLUGPLAY_CONTROL_PROPERTY_DATA; -// Class 0x0C +// PlugPlayControlGetRelatedDevice (0x0C) typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA { UNICODE_STRING TargetDeviceInstance; @@ -507,7 +519,7 @@ typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA ULONG RelatedDeviceInstanceLength; } PLUGPLAY_CONTROL_RELATED_DEVICE_DATA, *PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA; -// Class 0x0E +// PlugPlayControlDeviceStatus (0x0E) typedef struct _PLUGPLAY_CONTOL_STATUS_DATA { UNICODE_STRING DeviceInstance; @@ -516,14 +528,14 @@ typedef struct _PLUGPLAY_CONTOL_STATUS_DATA ULONG DeviceProblem; } PLUGPLAY_CONTROL_STATUS_DATA, *PPLUGPLAY_CONTROL_STATUS_DATA; -// Class 0x0F +// PlugPlayControlGetDeviceDepth (0x0F) typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA { UNICODE_STRING DeviceInstance; ULONG Depth; } PLUGPLAY_CONTROL_DEPTH_DATA, *PPLUGPLAY_CONTROL_DEPTH_DATA; -// Class 0x10 +// PlugPlayControlQueryDeviceRelations (0x10) typedef struct _PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA { UNICODE_STRING DeviceInstance; @@ -532,19 +544,13 @@ typedef struct _PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA PWCHAR Buffer; } PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA, *PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA; -// Class 0x13 +// PlugPlayControlRetrieveDock (0x13) typedef struct _PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA { ULONG DeviceInstanceLength; PWSTR DeviceInstance; } PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA, *PPLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA; -// Class 0x14 -typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA -{ - UNICODE_STRING DeviceInstance; -} PLUGPLAY_CONTROL_RESET_DEVICE_DATA, *PPLUGPLAY_CONTROL_RESET_DEVICE_DATA; - // // Plug and Play Bus Type Definition //
3 years, 9 months
1
0
0
0
[reactos] 01/01: [SHELL32] Enable auto-completion on SHBrowseForFolder (#3535)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b66bdef370f6f05dcaa1f…
commit b66bdef370f6f05dcaa1f37f070ad3b52486908c Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Mar 15 16:30:32 2021 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Mar 15 16:30:32 2021 +0900 [SHELL32] Enable auto-completion on SHBrowseForFolder (#3535) This PR realizes auto-completion on SHBrowseForFolder. CORE-9281 - Call SHAutoComplete in WM_INITDIALOG message handling. - Fix focus. - Remove ES_NOHIDESEL style. - Fix layout initialization. --- dll/win32/shell32/lang/bg-BG.rc | 2 +- dll/win32/shell32/lang/ca-ES.rc | 2 +- dll/win32/shell32/lang/cs-CZ.rc | 2 +- dll/win32/shell32/lang/da-DK.rc | 2 +- dll/win32/shell32/lang/de-DE.rc | 2 +- dll/win32/shell32/lang/el-GR.rc | 2 +- dll/win32/shell32/lang/en-GB.rc | 2 +- dll/win32/shell32/lang/en-US.rc | 2 +- dll/win32/shell32/lang/es-ES.rc | 2 +- dll/win32/shell32/lang/et-EE.rc | 2 +- dll/win32/shell32/lang/fi-FI.rc | 2 +- dll/win32/shell32/lang/fr-FR.rc | 2 +- dll/win32/shell32/lang/he-IL.rc | 2 +- dll/win32/shell32/lang/hi-IN.rc | 2 +- dll/win32/shell32/lang/hu-HU.rc | 2 +- dll/win32/shell32/lang/id-ID.rc | 2 +- dll/win32/shell32/lang/it-IT.rc | 2 +- dll/win32/shell32/lang/ja-JP.rc | 2 +- dll/win32/shell32/lang/ko-KR.rc | 2 +- dll/win32/shell32/lang/nl-NL.rc | 2 +- dll/win32/shell32/lang/no-NO.rc | 2 +- dll/win32/shell32/lang/pl-PL.rc | 2 +- dll/win32/shell32/lang/pt-BR.rc | 2 +- dll/win32/shell32/lang/pt-PT.rc | 2 +- dll/win32/shell32/lang/ro-RO.rc | 2 +- dll/win32/shell32/lang/ru-RU.rc | 2 +- dll/win32/shell32/lang/sk-SK.rc | 2 +- dll/win32/shell32/lang/sl-SI.rc | 2 +- dll/win32/shell32/lang/sq-AL.rc | 2 +- dll/win32/shell32/lang/sv-SE.rc | 2 +- dll/win32/shell32/lang/tr-TR.rc | 2 +- dll/win32/shell32/lang/uk-UA.rc | 2 +- dll/win32/shell32/lang/zh-CN.rc | 2 +- dll/win32/shell32/lang/zh-TW.rc | 2 +- dll/win32/shell32/wine/brsfolder.c | 10 ++++++---- 35 files changed, 40 insertions(+), 38 deletions(-) diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc index c7ee247b519..c642f0de061 100644 --- a/dll/win32/shell32/lang/bg-BG.rc +++ b/dll/win32/shell32/lang/bg-BG.rc @@ -108,7 +108,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Създаване на нова папка", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 10, 174, 92, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "Добре", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc index 10a55d2603b..f7953ff9666 100644 --- a/dll/win32/shell32/lang/ca-ES.rc +++ b/dll/win32/shell32/lang/ca-ES.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Make New Folder", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc index fe470b2d4c3..a551b668d1f 100644 --- a/dll/win32/shell32/lang/cs-CZ.rc +++ b/dll/win32/shell32/lang/cs-CZ.rc @@ -113,7 +113,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Vytvořit novou složku", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc index efead46d7ac..5f5b46f2248 100644 --- a/dll/win32/shell32/lang/da-DK.rc +++ b/dll/win32/shell32/lang/da-DK.rc @@ -113,7 +113,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Make New Folder", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc index 6a50fcb7429..9c310a97399 100644 --- a/dll/win32/shell32/lang/de-DE.rc +++ b/dll/win32/shell32/lang/de-DE.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Neuen Ordner erstellen", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc index b2b213a8d51..07a4088cbb4 100644 --- a/dll/win32/shell32/lang/el-GR.rc +++ b/dll/win32/shell32/lang/el-GR.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Δημιουργία φακέλου", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc index 39b0b8be1f4..4504f73e5ba 100644 --- a/dll/win32/shell32/lang/en-GB.rc +++ b/dll/win32/shell32/lang/en-GB.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Make New Folder", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc index b6ef5212506..e3f31e5bdc3 100644 --- a/dll/win32/shell32/lang/en-US.rc +++ b/dll/win32/shell32/lang/en-US.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Make New Folder", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc index 70370501bb3..efbd2b3cfe6 100644 --- a/dll/win32/shell32/lang/es-ES.rc +++ b/dll/win32/shell32/lang/es-ES.rc @@ -116,7 +116,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Crear nueva carpeta", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "Aceptar", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc index f52aa5c2061..0c3758ff233 100644 --- a/dll/win32/shell32/lang/et-EE.rc +++ b/dll/win32/shell32/lang/et-EE.rc @@ -114,7 +114,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Loo uus kaust", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc index 12d28bdafda..87c536f52b5 100644 --- a/dll/win32/shell32/lang/fi-FI.rc +++ b/dll/win32/shell32/lang/fi-FI.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Make New Folder", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc index 2d37c5f7783..475cbb8bcf6 100644 --- a/dll/win32/shell32/lang/fr-FR.rc +++ b/dll/win32/shell32/lang/fr-FR.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "Créer un nouveau dossier", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 8, 174, 90, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc index 879d523ebd8..ba856e74e6f 100644 --- a/dll/win32/shell32/lang/he-IL.rc +++ b/dll/win32/shell32/lang/he-IL.rc @@ -109,7 +109,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "צור תיקיה חדשה", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "אישור", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc index 81b80b160ef..bfe550b09f8 100644 --- a/dll/win32/shell32/lang/hi-IN.rc +++ b/dll/win32/shell32/lang/hi-IN.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "नया फ़ोल्डर &बनाओ", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "ओके", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc index 1feddc9f590..5e8c6c9f19d 100644 --- a/dll/win32/shell32/lang/hu-HU.rc +++ b/dll/win32/shell32/lang/hu-HU.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Új mappa létrehozása", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc index b9d0ebe7835..d14c5b51e06 100644 --- a/dll/win32/shell32/lang/id-ID.rc +++ b/dll/win32/shell32/lang/id-ID.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Buat Folder Baru", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc index ccc85c8c74f..b6beb84a9b8 100644 --- a/dll/win32/shell32/lang/it-IT.rc +++ b/dll/win32/shell32/lang/it-IT.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Crea una nuova cartella", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc index 4a6a5e6c204..7da117b3e6a 100644 --- a/dll/win32/shell32/lang/ja-JP.rc +++ b/dll/win32/shell32/lang/ja-JP.rc @@ -107,7 +107,7 @@ FONT 9, "MS UI Gothic" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "新しいフォルダの作成(&M)", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 188, 85, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc index 876fcbd96ff..ca1e9be30ca 100644 --- a/dll/win32/shell32/lang/ko-KR.rc +++ b/dll/win32/shell32/lang/ko-KR.rc @@ -107,7 +107,7 @@ FONT 9, "굴림" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Make New Folder", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc index e165039bef1..bc5e2a318e2 100644 --- a/dll/win32/shell32/lang/nl-NL.rc +++ b/dll/win32/shell32/lang/nl-NL.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Make New Folder", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc index a7497b67c61..53b9cd986b1 100644 --- a/dll/win32/shell32/lang/no-NO.rc +++ b/dll/win32/shell32/lang/no-NO.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Lag en ny mappe", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index dd5d1038c0e..18b64688e01 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -113,7 +113,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Utwórz katalog", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc index 75ea3b4dc1a..92e471b8a6c 100644 --- a/dll/win32/shell32/lang/pt-BR.rc +++ b/dll/win32/shell32/lang/pt-BR.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Criar Nova Pasta", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc index 8865088a5b9..dc40de74c24 100644 --- a/dll/win32/shell32/lang/pt-PT.rc +++ b/dll/win32/shell32/lang/pt-PT.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Criar nova pasta", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc index 89b15b3935b..fd6ce151637 100644 --- a/dll/win32/shell32/lang/ro-RO.rc +++ b/dll/win32/shell32/lang/ro-RO.rc @@ -109,7 +109,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Crează dosar nou", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "Con&firmă", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc index ed7f79700d2..a4f65a4bfa7 100644 --- a/dll/win32/shell32/lang/ru-RU.rc +++ b/dll/win32/shell32/lang/ru-RU.rc @@ -114,7 +114,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Создать папку", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc index 17e00f5de40..58aad4e2548 100644 --- a/dll/win32/shell32/lang/sk-SK.rc +++ b/dll/win32/shell32/lang/sk-SK.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Vytvoriť nový priečinok", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc index b5fb54f0655..ef25cff8d69 100644 --- a/dll/win32/shell32/lang/sl-SI.rc +++ b/dll/win32/shell32/lang/sl-SI.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Make New Folder", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc index 30d1991d34a..a59e5aa9591 100644 --- a/dll/win32/shell32/lang/sq-AL.rc +++ b/dll/win32/shell32/lang/sq-AL.rc @@ -111,7 +111,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Bëj Dosje T're", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc index a4459697b7d..cf25c557f5d 100644 --- a/dll/win32/shell32/lang/sv-SE.rc +++ b/dll/win32/shell32/lang/sv-SE.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Skapa ny mapp", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc index f741f5eec9f..f00df22ce1a 100644 --- a/dll/win32/shell32/lang/tr-TR.rc +++ b/dll/win32/shell32/lang/tr-TR.rc @@ -109,7 +109,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "&Yeni Dizin Oluştur", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "Tamam", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc index 98bf4a90e79..3f4d9173698 100644 --- a/dll/win32/shell32/lang/uk-UA.rc +++ b/dll/win32/shell32/lang/uk-UA.rc @@ -107,7 +107,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "Створити &папку", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index 98f52e3394f..23368203ef5 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -117,7 +117,7 @@ FONT 9, "宋体" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "创建新文件夹(&M)", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "确定", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc index 7466240c5a1..e923db6b33c 100644 --- a/dll/win32/shell32/lang/zh-TW.rc +++ b/dll/win32/shell32/lang/zh-TW.rc @@ -117,7 +117,7 @@ FONT 9, "新細明體" BEGIN LTEXT "", IDC_BROWSE_FOR_FOLDER_TITLE, 10, 8, 198, 24 LTEXT "", IDC_BROWSE_FOR_FOLDER_STATUS, 10, 25, 198, 12 - EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | ES_NOHIDESEL | WS_GROUP + EDITTEXT IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, 12, 38, 194, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "", IDC_BROWSE_FOR_FOLDER_TREEVIEW, "SysTreeView32", TVS_SHOWSELALWAYS | TVS_EDITLABELS | TVS_LINESATROOT | TVS_HASLINES | TVS_HASBUTTONS | WS_BORDER | WS_TABSTOP, 12, 58, 194, 105 PUSHBUTTON "建立新資料夾(&M)", IDC_BROWSE_FOR_FOLDER_NEW_FOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "確定", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP diff --git a/dll/win32/shell32/wine/brsfolder.c b/dll/win32/shell32/wine/brsfolder.c index 452c789ec1f..b9983d1f1f0 100644 --- a/dll/win32/shell32/wine/brsfolder.c +++ b/dll/win32/shell32/wine/brsfolder.c @@ -881,9 +881,9 @@ static BOOL BrsFolder_OnCreate( HWND hWnd, browse_info *info ) browsefolder_callback( info->lpBrowseInfo, hWnd, BFFM_INITIALIZED, 0 ); #ifdef __REACTOS__ - SendDlgItemMessage(hWnd, IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT, EM_SETSEL, 0, -1); - SetFocus(GetDlgItem(hWnd, IDOK)); - return FALSE; + SHAutoComplete(GetDlgItem(hWnd, IDC_BROWSE_FOR_FOLDER_FOLDER_TEXT), + (SHACF_FILESYS_ONLY | SHACF_URLHISTORY | SHACF_FILESYSTEM)); + return TRUE; #else return TRUE; #endif @@ -1425,7 +1425,9 @@ LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi) info.lpBrowseInfo = lpbi; info.hwndTreeView = NULL; -#ifndef __REACTOS__ +#ifdef __REACTOS__ + info.layout = NULL; +#else icex.dwSize = sizeof( icex ); icex.dwICC = ICC_TREEVIEW_CLASSES; InitCommonControlsEx( &icex );
3 years, 9 months
1
0
0
0
[reactos] 02/02: [HALX86] Remove unused and empty files, remove halapic
by Victor Perevertkin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a064c5d9a02485a57ce19…
commit a064c5d9a02485a57ce1960e4377dd281ba28fbe Author: Victor Perevertkin <victor.perevertkin(a)reactos.org> AuthorDate: Mon Mar 15 02:51:25 2021 +0300 Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org> CommitDate: Mon Mar 15 02:51:25 2021 +0300 [HALX86] Remove unused and empty files, remove halapic halapic (a.k.a. non-ACPI APIC HAL) is not going to be supported in near future --- hal/halx86/CMakeLists.txt | 4 +- hal/halx86/amd64/halinit.c | 53 ------------------------- hal/halx86/amd64/mps.S | 97 --------------------------------------------- hal/halx86/amd64/stubs.c | 21 ---------- hal/halx86/amd64/systimer.S | 28 ------------- 5 files changed, 1 insertion(+), 202 deletions(-) diff --git a/hal/halx86/CMakeLists.txt b/hal/halx86/CMakeLists.txt index 890a4b4ebd6..abb3c1dd469 100644 --- a/hal/halx86/CMakeLists.txt +++ b/hal/halx86/CMakeLists.txt @@ -60,7 +60,6 @@ if(ARCH STREQUAL "i386") # hal add_hal(hal SOURCES pic/halpic.rc COMPONENTS generic legacy up pic) add_hal(halacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi up pic) - add_hal(halapic SOURCES acpi/halacpi.rc COMPONENTS generic legacy up apic) add_hal(halaacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi up apic) add_hal(halxbox SOURCES xbox/halxbox.rc COMPONENTS xbox up) add_hal(halpc98 SOURCES pc98/halpc98.rc COMPONENTS pc98 up) @@ -73,8 +72,7 @@ if(ARCH STREQUAL "i386") elseif(ARCH STREQUAL "amd64") list(APPEND HAL_SOURCE - amd64/x86bios.c - amd64/halinit.c) + amd64/x86bios.c) add_hal(hal SOURCES ${HAL_SOURCE} COMPONENTS generic acpi up apic) target_link_libraries(hal fast486) diff --git a/hal/halx86/amd64/halinit.c b/hal/halx86/amd64/halinit.c deleted file mode 100644 index c67b94a70a7..00000000000 --- a/hal/halx86/amd64/halinit.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * PROJECT: ReactOS HAL - * LICENSE: GPL - See COPYING in the top level directory - * FILE: hal/halx86/amd64/halinit.c - * PURPOSE: HAL Entrypoint and Initialization - * PROGRAMMERS: - */ - -/* INCLUDES ******************************************************************/ - -#include <hal.h> -#define NDEBUG -#include <debug.h> - -/* GLOBALS *******************************************************************/ - -BOOLEAN HalpPciLockSettings; - -/* PRIVATE FUNCTIONS *********************************************************/ - -/* FUNCTIONS *****************************************************************/ -#if 0 -VOID -NTAPI -HalpInitProcessor( - IN ULONG ProcessorNumber, - IN PLOADER_PARAMETER_BLOCK LoaderBlock) -{ - DPRINT1("ApicInitializeProcessor(%ld)\n", ProcessorNumber); - - /* Initialize the local APIC for this cpu */ - ApicInitializeLocalApic(ProcessorNumber); - - /* Initialize the timer */ - //ApicInitializeTimer(ProcessorNumber); - -} - - -VOID -HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) -{ - -} - -VOID -HalpInitPhase1(VOID) -{ - -} - -#endif - diff --git a/hal/halx86/amd64/mps.S b/hal/halx86/amd64/mps.S deleted file mode 100644 index 6d1b33c46db..00000000000 --- a/hal/halx86/amd64/mps.S +++ /dev/null @@ -1,97 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: hal/halx86/amd64/mps.S - * PURPOSE: Intel MultiProcessor specification support - * PROGRAMMER: Casper S. Hornstrup (chorns(a)users.sourceforge.net) - */ - -/* INCLUDES ******************************************************************/ - -#include <asm.inc> - -#include <ksamd64.inc> - -/* FUNCTIONS *****************************************************************/ - -#define BEFORE \ - cld; \ - push rax; \ - push rbx; \ - push rcx; \ - push rdx; \ - push rsi; \ - push rdi; \ - push fs; \ - push gs; \ - -#define AFTER \ - pop gs; \ - pop fs; \ - pop rdi; \ - pop rsi; \ - pop rdx; \ - pop rcx; \ - pop rbx; \ - pop rax; \ - -#ifdef CONFIG_SMP -PUBLIC MpsIpiInterrupt -MpsIpiInterrupt: - /* Save registers */ - BEFORE - - /* Call the C handler */ - call MpsIpiHandler - - /* Return to the caller */ - AFTER - iret -#endif - -PUBLIC MpsErrorInterrupt -MpsErrorInterrupt: - /* Save registers */ - BEFORE - - /* Call the C handler */ - call MpsErrorHandler - - /* Return to the caller */ - AFTER - iret - - -PUBLIC MpsSpuriousInterrupt -MpsSpuriousInterrupt: - /* Save registers */ - BEFORE - - /* Call the C handler */ - call MpsSpuriousHandler - - /* Return to the caller */ - AFTER - iret - -PUBLIC MpsTimerInterrupt -MpsTimerInterrupt: - /* Save registers */ - BEFORE - - mov ebx, 0xef - mov eax, 0xceafbeef - push rax - push rsp - push rbx - call MpsTimerHandler - pop rax - pop rax - pop rax - - /* Return to the caller */ - AFTER - iret - -END -/* EOF */ diff --git a/hal/halx86/amd64/stubs.c b/hal/halx86/amd64/stubs.c deleted file mode 100644 index f3cfd726db6..00000000000 --- a/hal/halx86/amd64/stubs.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * PROJECT: ReactOS HAL - * LICENSE: GPL - See COPYING.ARM in the top level directory - * FILE: hal/halx86/amd64/stubs.c - * PURPOSE: HAL stubs - * PROGRAMMERS: - */ - -/* INCLUDES *******************************************************************/ - -#include <hal.h> -#define NDEBUG -#include <debug.h> - -/* GLOBALS ********************************************************************/ - -//LARGE_INTEGER HalpPerformanceFrequency; - - -/* FUNCTIONS ******************************************************************/ - diff --git a/hal/halx86/amd64/systimer.S b/hal/halx86/amd64/systimer.S deleted file mode 100644 index f0adaef5932..00000000000 --- a/hal/halx86/amd64/systimer.S +++ /dev/null @@ -1,28 +0,0 @@ -/* - * FILE: hal/halx86/amd64/systimer.S - * COPYRIGHT: See COPYING in the top level directory - * PURPOSE: System Timer Interrupt and Management - * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#include <asm.inc> -#include <ksamd64.inc> - -/* GLOBALS *******************************************************************/ - -.data - -PUBLIC MsgUnimplemented -MsgUnimplemented: -.asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n" - - -/* FUNCTIONS *****************************************************************/ - -.code64 - - - -END
3 years, 9 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200