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
August 2008
----- 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
27 participants
853 discussions
Start a n
N
ew thread
[jimtabor] 35022: - Implemented NotifyWinEvent, SetWinEventHook and UnhookWinEvent. - I only enables test_winevents(), test_set_hook() and all related with wine Msg tests. The test takes a while to run due to the IsWinEventHookInstalled check. I optimized our mask set to take this into account. The results are, the test is slow and our code is fast. - We pass all Event and Local Hook tests. Will research the problem with global hooks and finish it up.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Aug 1 19:38:01 2008 New Revision: 35022 URL:
http://svn.reactos.org/svn/reactos?rev=35022&view=rev
Log: - Implemented NotifyWinEvent, SetWinEventHook and UnhookWinEvent. - I only enables test_winevents(), test_set_hook() and all related with wine Msg tests. The test takes a while to run due to the IsWinEventHookInstalled check. I optimized our mask set to take this into account. The results are, the test is slow and our code is fast. - We pass all Event and Local Hook tests. Will research the problem with global hooks and finish it up. Modified: trunk/reactos/subsystems/win32/win32k/include/window.h trunk/reactos/subsystems/win32/win32k/ntuser/event.c trunk/reactos/subsystems/win32/win32k/ntuser/hook.c trunk/reactos/subsystems/win32/win32k/ntuser/window.c Modified: trunk/reactos/subsystems/win32/win32k/include/window.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] Fri Aug 1 19:38:01 2008 @@ -167,6 +167,8 @@ LRESULT FASTCALL IntDefWindowProc( PWINDOW_OBJECT Window, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Ansi); +VOID FASTCALL IntNotifyWinEvent(DWORD, PWINDOW_OBJECT, LONG, LONG); + #endif /* _WIN32K_WINDOW_H */ /* EOF */ Modified: trunk/reactos/subsystems/win32/win32k/ntuser/event.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] Fri Aug 1 19:38:01 2008 @@ -4,9 +4,14 @@ #define NDEBUG #include <debug.h> +typedef struct _EVENTPACK +{ + PEVENTHOOK pEH; + LONG idObject; + LONG idChild; +} EVENTPACK, *PEVENTPACK; + static PEVENTTABLE GlobalEvents = NULL; -static ULONG EventSys[EVENT_SYSTEM_MINIMIZEEND+1] = {0}; -static ULONG EventObj[( EVENT_OBJECT_ACCELERATORCHANGE - EVENT_OBJECT_CREATE) +1] = {0}; /* PRIVATE FUNCTIONS *********************************************************/ @@ -47,92 +52,38 @@ static VOID FASTCALL -IntEventUpCount(ULONG eventMin, ULONG eventMax) -{ - INT i, Min, Max; - - if ( eventMin >= EVENT_SYSTEM_SOUND && eventMax <= EVENT_SYSTEM_MINIMIZEEND) - { - for (i = eventMin; i < eventMax; i++) - { - gpsi->SrvEventActivity |= GetMaskFromEvent(i); - EventSys[i]++; - } - } - if ( eventMin >= EVENT_OBJECT_CREATE && eventMax <= EVENT_OBJECT_ACCELERATORCHANGE) - { - for (i = eventMin; i < eventMax; i++) - { - gpsi->SrvEventActivity |= GetMaskFromEvent(i); - EventObj[i - EVENT_OBJECT_CREATE]++; - } - } - if ( eventMin >= EVENT_SYSTEM_SOUND && eventMax <= EVENT_OBJECT_ACCELERATORCHANGE) - { - Max = EVENT_SYSTEM_MINIMIZEEND; - for (i = eventMin; i < Max; i++) - { - gpsi->SrvEventActivity |= GetMaskFromEvent(i); - EventSys[i]++; - } - Min = EVENT_OBJECT_CREATE; - for (i = Min; i < eventMax; i++) - { - gpsi->SrvEventActivity |= GetMaskFromEvent(i); - EventObj[i - EVENT_OBJECT_CREATE]++; - } - } -} - -static -VOID -FASTCALL -IntEventDownCount(ULONG eventMin, ULONG eventMax) -{ - INT i, Min, Max; - - if ( eventMin >= EVENT_SYSTEM_SOUND && eventMax <= EVENT_SYSTEM_MINIMIZEEND) - { - for (i = eventMin; i < eventMax; i++) - { - EventSys[i]--; - if (!EventSys[i]) gpsi->SrvEventActivity &= ~GetMaskFromEvent(i); - } - } - if ( eventMin >= EVENT_OBJECT_CREATE && eventMax <= EVENT_OBJECT_ACCELERATORCHANGE) - { - for (i = eventMin; i < eventMax; i++) - { - EventObj[i - EVENT_OBJECT_CREATE]--; - if (!EventObj[i - EVENT_OBJECT_CREATE]) - gpsi->SrvEventActivity &= ~GetMaskFromEvent(i); - } - } - if ( eventMin >= EVENT_SYSTEM_SOUND && eventMax <= EVENT_OBJECT_ACCELERATORCHANGE) - { - Max = EVENT_SYSTEM_MINIMIZEEND; - for (i = eventMin; i < Max; i++) - { - EventSys[i]--; - if (!EventSys[i]) gpsi->SrvEventActivity &= ~GetMaskFromEvent(i); - } - Min = EVENT_OBJECT_CREATE; - for (i = Min; i < eventMax; i++) - { - EventObj[i - EVENT_OBJECT_CREATE]--; - if (!EventObj[i - EVENT_OBJECT_CREATE]) - gpsi->SrvEventActivity &= ~GetMaskFromEvent(i); - } - } -} - - -static -DWORD -FASTCALL -TimeStamp(VOID) -{ - return (DWORD)((ULONGLONG)SharedUserData->TickCountLowDeprecated * SharedUserData->TickCountMultiplier / 16777216); +IntSetSrvEventMask( UINT EventMin, UINT EventMax) +{ + UINT event; + DPRINT("SetSrvEventMask 1\n"); + for ( event = EventMin; event <= EventMax; event++) + { + if ((event >= EVENT_SYSTEM_SOUND && event <= EVENT_SYSTEM_MINIMIZEEND) || + (event >= EVENT_CONSOLE_CARET && event <= EVENT_CONSOLE_END_APPLICATION) || + (event >= EVENT_OBJECT_CREATE && event <= EVENT_OBJECT_ACCELERATORCHANGE)) + { + gpsi->SrvEventActivity |= GetMaskFromEvent(event); + } + if (event > EVENT_SYSTEM_MINIMIZEEND && event < EVENT_CONSOLE_CARET) + { + event = EVENT_CONSOLE_CARET-1; + gpsi->SrvEventActivity |= GetMaskFromEvent(event); + } + if (event > EVENT_CONSOLE_END_APPLICATION && event < EVENT_OBJECT_CREATE ) + { + event = EVENT_OBJECT_CREATE-1; + gpsi->SrvEventActivity |= GetMaskFromEvent(event); + } + if (event > EVENT_OBJECT_ACCELERATORCHANGE && event < EVENT_MAX) + { + event = EVENT_MAX-1; + gpsi->SrvEventActivity |= GetMaskFromEvent(event); + break; + } + } + if (!gpsi->SrvEventActivity) + gpsi->SrvEventActivity |= SRV_EVENT_RUNNING; // Set something. + DPRINT("SetSrvEventMask 2 : %x\n", gpsi->SrvEventActivity); } static @@ -146,14 +97,19 @@ { NTSTATUS Status; ULONG_PTR uResult; + EVENTPACK EP; + + EP.pEH = pEH; + EP.idObject = idObject; + EP.idChild = idChild; /* FIXME should get timeout from * HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */ Status = co_MsqSendMessage(((PW32THREAD)pEH->Thread->Tcb.Win32Thread)->MessageQueue, hwnd, event, - idObject, - idChild, + 0, + (LPARAM)&EP, 5000, TRUE, MSQ_ISEVENT, @@ -162,6 +118,7 @@ return NT_SUCCESS(Status) ? uResult : 0; } + static BOOL FASTCALL @@ -171,6 +128,7 @@ { RemoveEntryList(&pEH->Chain); GlobalEvents->Counts--; + if (!GlobalEvents->Counts) gpsi->SrvEventActivity = 0; UserDeleteObject(pEH->Self, otEvent); return TRUE; } @@ -186,30 +144,73 @@ LONG idObject, LONG idChild) { - - PEVENTHOOK pEH = UserHeapAlloc(sizeof(EVENTHOOK)); - - if ((gpsi->SrvEventActivity & GetMaskFromEvent(event))) return 0; // No events to run. - - - if ((pEH->Thread != PsGetCurrentThread()) && (pEH->Thread != NULL)) - { - // Post it in message queue. - return IntCallLowLevelEvent(pEH, event, hwnd, idObject, idChild); - } - - - LRESULT Result = co_IntCallEventProc(pEH->Self, - event, - hwnd, - idObject, - idChild, - (DWORD)(NtCurrentTeb()->Cid).UniqueThread, - TimeStamp(), - pEH->Proc); + PEVENTHOOK pEH; + LRESULT Result; + PEVENTPACK pEP = (PEVENTPACK)idChild; + + pEH = pEP->pEH; + + Result = co_IntCallEventProc( pEH->Self, + event, + hwnd, + pEP->idObject, + pEP->idChild, + (DWORD)(NtCurrentTeb()->Cid).UniqueThread, + (DWORD)EngGetTickCount(), + pEH->Proc); return Result; } +VOID +FASTCALL +IntNotifyWinEvent( + DWORD Event, + PWINDOW_OBJECT Window, + LONG idObject, + LONG idChild) +{ + PEVENTHOOK pEH; + LRESULT Result; + + if (!GlobalEvents->Counts) return; + + pEH = (PEVENTHOOK)GlobalEvents->Events.Flink; + + do + { + UserReferenceObject(pEH); + // Must be inside the event window. + if ( (pEH->eventMin <= Event) && (pEH->eventMax >= Event)) + { + if ((pEH->Thread != PsGetCurrentThread()) && (pEH->Thread != NULL)) + { // if all process || all thread || other thread same process + if (!(pEH->idProcess) || !(pEH->idThread) || + ((DWORD)(NtCurrentTeb()->Cid).UniqueProcess == pEH->idProcess)) + { + Result = IntCallLowLevelEvent(pEH, Event, Window->hSelf, idObject, idChild); + } + }// if ^skip own thread && ((Pid && CPid == Pid && ^skip own process) || all process) + else if ( !(pEH->Flags & WINEVENT_SKIPOWNTHREAD) && + ( ((pEH->idProcess && + (DWORD)(NtCurrentTeb()->Cid).UniqueProcess == pEH->idProcess) && + !(pEH->Flags & WINEVENT_SKIPOWNPROCESS)) || + !pEH->idProcess ) ) + { + Result = co_IntCallEventProc( pEH->Self, + Event, + Window->hSelf, + idObject, + idChild, + (DWORD)(NtCurrentTeb()->Cid).UniqueThread, + (DWORD)EngGetTickCount(), + pEH->Proc); + } + } + UserDereferenceObject(pEH); + + pEH = (PEVENTHOOK)pEH->Chain.Flink; + } while (pEH != (PEVENTHOOK)&GlobalEvents->Events.Flink); +} VOID STDCALL @@ -219,8 +220,22 @@ LONG idObject, LONG idChild) { + PWINDOW_OBJECT Window = NULL; + USER_REFERENCE_ENTRY Ref; UserEnterExclusive(); - UNIMPLEMENTED + + /* Validate input */ + if (hWnd && (hWnd != INVALID_HANDLE_VALUE) && !(Window = UserGetWindowObject(hWnd))) + { + return; + } + + if (gpsi->SrvEventActivity & GetMaskFromEvent(Event)) + { + UserRefObjectCo(Window, &Ref); + IntNotifyWinEvent( Event, Window, idObject, idChild); + UserDerefObjectCo(Window); + } UserLeave(); } @@ -241,10 +256,9 @@ UNICODE_STRING ModuleName; NTSTATUS Status; HANDLE Handle; + PETHREAD Thread = NULL; UserEnterExclusive(); - - DPRINT1("WARNING! Use at your own risk! Function is UNIMPLEMENTED!\n"); if ( !GlobalEvents ) { @@ -253,6 +267,34 @@ InitializeListHead(&GlobalEvents->Events); } + if (eventMin > eventMax) + { + SetLastWin32Error(ERROR_INVALID_HOOK_FILTER); + goto SetEventExit; + } + + if (!lpfnWinEventProc) + { + SetLastWin32Error(ERROR_INVALID_FILTER_PROC); + goto SetEventExit; + } + + if ((dwflags & WINEVENT_INCONTEXT) && !hmodWinEventProc) + { + SetLastWin32Error(ERROR_HOOK_NEEDS_HMOD); + goto SetEventExit; + } + + if (idThread) + { + Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)idThread, &Thread); + if (!NT_SUCCESS(Status)) + { + SetLastWin32Error(ERROR_INVALID_THREAD_ID); + goto SetEventExit; + } + } + pEH = UserCreateObject(gHandleTable, &Handle, otEvent, sizeof(EVENTHOOK)); if (pEH) { @@ -260,7 +302,10 @@ GlobalEvents->Counts++; pEH->Self = Handle; - pEH->Thread = PsGetCurrentThread(); + if (Thread) + pEH->Thread = Thread; + else + pEH->Thread = PsGetCurrentThread(); pEH->eventMin = eventMin; pEH->eventMax = eventMax; pEH->idProcess = idProcess; @@ -268,21 +313,13 @@ pEH->Ansi = FALSE; pEH->Flags = dwflags; - if ((dwflags & WINEVENT_INCONTEXT) && !hmodWinEventProc) - { - SetLastWin32Error(ERROR_HOOK_NEEDS_HMOD); - goto SetEventExit; - } - - if (eventMin > eventMax) - { - SetLastWin32Error(ERROR_INVALID_HOOK_FILTER); - goto SetEventExit; - } if (NULL != hmodWinEventProc) { - Status = MmCopyFromCaller(&ModuleName, puString, sizeof(UNICODE_STRING)); + Status = MmCopyFromCaller(&ModuleName, + puString, + sizeof(UNICODE_STRING)); + if (! NT_SUCCESS(Status)) { UserDereferenceObject(pEH); @@ -290,9 +327,11 @@ SetLastNtError(Status); goto SetEventExit; } + pEH->ModuleName.Buffer = ExAllocatePoolWithTag(PagedPool, ModuleName.MaximumLength, TAG_HOOK); + if (NULL == pEH->ModuleName.Buffer) { UserDereferenceObject(pEH); @@ -300,10 +339,13 @@ SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); goto SetEventExit; } + pEH->ModuleName.MaximumLength = ModuleName.MaximumLength; + Status = MmCopyFromCaller(pEH->ModuleName.Buffer, ModuleName.Buffer, ModuleName.MaximumLength); + if (! NT_SUCCESS(Status)) { ExFreePool(pEH->ModuleName.Buffer); @@ -312,24 +354,23 @@ SetLastNtError(Status); goto SetEventExit; } + pEH->ModuleName.Length = ModuleName.Length; + pEH->Proc = (void *)((char *)lpfnWinEventProc - (char *)hmodWinEventProc); } else pEH->Proc = lpfnWinEventProc; Ret = Handle; - /* - Now we are good, set the Events and counts. - */ - IntEventUpCount(eventMin, eventMax); + IntSetSrvEventMask( eventMin, eventMax); } SetEventExit: + if (Thread) ObDereferenceObject(Thread); UserLeave(); return Ret; } - BOOL STDCALL @@ -341,12 +382,9 @@ UserEnterExclusive(); - DPRINT1("WARNING! Use at your own risk! Function is UNIMPLEMENTED!\n"); - pEH = (PEVENTHOOK)UserGetObject(gHandleTable, hWinEventHook, otEvent); if (pEH) { - IntEventDownCount(pEH->eventMin, pEH->eventMax); Ret = IntRemoveEvent(pEH); } Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Fri Aug 1 19:38:01 2008 @@ -974,9 +974,15 @@ DPRINT("Enter NtUserSetWindowsHookEx\n"); UserEnterExclusive(); - if (HookId < WH_MINHOOK || WH_MAXHOOK < HookId || NULL == HookProc) + if (HookId < WH_MINHOOK || WH_MAXHOOK < HookId ) { SetLastWin32Error(ERROR_INVALID_PARAMETER); + RETURN( NULL); + } + + if (!HookProc) + { + SetLastWin32Error(ERROR_INVALID_FILTER_PROC); RETURN( NULL); } @@ -1029,7 +1035,7 @@ } else if (NULL == Mod) { - SetLastWin32Error(ERROR_INVALID_PARAMETER); + SetLastWin32Error(ERROR_HOOK_NEEDS_HMOD); RETURN( NULL); } else @@ -1039,10 +1045,7 @@ Global = TRUE; } - /* We only (partially) support local WH_CBT hooks and - * WH_KEYBOARD_LL, WH_MOUSE_LL and WH_GETMESSAGE hooks for now - */ - if (Global || + if ( Global || WH_DEBUG == HookId || WH_JOURNALPLAYBACK == HookId || WH_JOURNALRECORD == HookId) Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Fri Aug 1 19:38:01 2008 @@ -2059,7 +2059,7 @@ RETURN((HWND)0); } #if 0 - Result = co_EVENT_CallEvents(EVENT_OBJECT_CREATE, Window->hSelf, OBJID_WINDOW, 0); + Result = IntNotifyWinEvent(EVENT_OBJECT_CREATE, Window, OBJID_WINDOW, 0); if (Result == (LRESULT)-1) {
16 years, 4 months
1
0
0
0
[tkreuzer] 35021: use constants from winddk and get rid of private definitions.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 1 17:18:58 2008 New Revision: 35021 URL:
http://svn.reactos.org/svn/reactos?rev=35021&view=rev
Log: use constants from winddk and get rid of private definitions. Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/loader.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/loader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/loader.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/loader.c [iso-8859-1] Fri Aug 1 17:18:58 2008 @@ -134,14 +134,14 @@ PPAGE_DIRECTORY_AMD64 pDir3, pDir2, pDir1; ULONG Index; - pDir3 = FrLdrGetOrCreatePageDir(pPML4, VAtoIndex4(VirtualAddress)); - pDir2 = FrLdrGetOrCreatePageDir(pDir3, VAtoIndex3(VirtualAddress)); - pDir1 = FrLdrGetOrCreatePageDir(pDir2, VAtoIndex2(VirtualAddress)); + pDir3 = FrLdrGetOrCreatePageDir(pPML4, VAtoPXI(VirtualAddress)); + pDir2 = FrLdrGetOrCreatePageDir(pDir3, VAtoPPI(VirtualAddress)); + pDir1 = FrLdrGetOrCreatePageDir(pDir2, VAtoPDI(VirtualAddress)); if (!pDir1) return FALSE; - Index = VAtoIndex1(VirtualAddress); + Index = VAtoPTI(VirtualAddress); if (pDir1->Pde[Index].Valid) { return FALSE; @@ -203,14 +203,9 @@ /* The page tables are located at 0xfffff68000000000 * We create a recursive self mapping through all 4 levels at * virtual address 0xfffff6fb7dbedf68 */ - pPML4->Pde[VAtoIndex4(PML4_BASE)].Valid = 1; - pPML4->Pde[VAtoIndex4(PML4_BASE)].Write = 1; - pPML4->Pde[VAtoIndex4(PML4_BASE)].PageFrameNumber = PtrToPfn(PML4_BASE); - - ASSERT(VAtoIndex4(PML4_BASE) == 0x1ed); - ASSERT(VAtoIndex3(PML4_BASE) == 0x1ed); - ASSERT(VAtoIndex2(PML4_BASE) == 0x1ed); - ASSERT(VAtoIndex1(PML4_BASE) == 0x1ed); + pPML4->Pde[VAtoPXI(PXE_BASE)].Valid = 1; + pPML4->Pde[VAtoPXI(PXE_BASE)].Write = 1; + pPML4->Pde[VAtoPXI(PXE_BASE)].PageFrameNumber = PtrToPfn(PXE_BASE); /* Setup low memory pages */ if (FrLdrMapRangeOfPages(0, 0, 1024) < 1024) Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h [iso-8859-1] Fri Aug 1 17:18:58 2008 @@ -28,21 +28,15 @@ #define LMODE_DS 0x10 #define VA_MASK 0x0000FFFFFFFFFFFFUL -#define PML4_SHIFT (12+9+9+9) -#define PDP_SHIFT (12+9+9) -#define PD_SHIFT (12+9) -#define PT_SHIFT 12 #define PtrToPfn(p) \ - ((((ULONGLONG)p) >> PT_SHIFT) & 0xffffffffffULL) + ((((ULONGLONG)p) >> PAGE_SHIFT) & 0xffffffffffULL) -#define VAtoIndex4(va) (((va) >> PML4_SHIFT) & 0x1FF) -#define VAtoIndex3(va) (((va) >> PDP_SHIFT) & 0x1FF) -#define VAtoIndex2(va) (((va) >> PD_SHIFT) & 0x1FF) -#define VAtoIndex1(va) (((va) >> PT_SHIFT) & 0x1FF) +#define VAtoPXI(va) (((va) >> PXI_SHIFT) & 0x1FF) +#define VAtoPPI(va) (((va) >> PPI_SHIFT) & 0x1FF) +#define VAtoPDI(va) (((va) >> PDI_SHIFT) & 0x1FF) +#define VAtoPTI(va) (((va) >> PTI_SHIFT) & 0x1FF) -#define PAGETABLE_BASE 0xfffff68000000000ULL -#define PML4_BASE 0xfffff6fb7dbedf68ULL #define HYPERSPACE_BASE 0xfffff70000000000ULL #define HAL_BASE 0xffffffff80000000ULL #define APIC_BASE 0xffffffffff000000ULL // FIXME
16 years, 4 months
1
0
0
0
[jmorlan] 35020: In rsym, allow a stabs entry to be longer than 256 characters, so that ROS may be compiled with -feliminate-unused-debug-symbols which reduces the needed disk space a lot.
by jmorlan@svn.reactos.org
Author: jmorlan Date: Fri Aug 1 16:48:54 2008 New Revision: 35020 URL:
http://svn.reactos.org/svn/reactos?rev=35020&view=rev
Log: In rsym, allow a stabs entry to be longer than 256 characters, so that ROS may be compiled with -feliminate-unused-debug-symbols which reduces the needed disk space a lot. Modified: trunk/reactos/tools/rsym.c Modified: trunk/reactos/tools/rsym.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym.c?rev=35020&r1=…
============================================================================== --- trunk/reactos/tools/rsym.c [iso-8859-1] (original) +++ trunk/reactos/tools/rsym.c [iso-8859-1] Fri Aug 1 16:48:54 2008 @@ -143,6 +143,7 @@ ULONG_PTR Address, LastFunctionAddress; int First = 1; char *Name; + ULONG NameLen; char FuncName[256]; PROSSYM_ENTRY Current; @@ -220,18 +221,16 @@ Current->Address = Address; Current->FileOffset = Current[-1].FileOffset; } - if (sizeof(FuncName) <= strlen((char *) StabStringsBase + StabEntry[i].n_strx)) + Name = (char *) StabStringsBase + StabEntry[i].n_strx; + NameLen = strcspn(Name, ":"); + if (sizeof(FuncName) <= NameLen) { free(*SymbolsBase); fprintf(stderr, "Function name too long\n"); return 1; } - strcpy(FuncName, (char *) StabStringsBase + StabEntry[i].n_strx); - Name = strchr(FuncName, ':'); - if (NULL != Name) - { - *Name = '\0'; - } + memcpy(FuncName, Name, NameLen); + FuncName[NameLen] = '\0'; Current->FunctionOffset = FindOrAddString(FuncName, StringsLength, StringsBase);
16 years, 4 months
1
0
0
0
[arty] 35019: Merge aicom-network-fixes up to r35014 | cgutman | 2008-08-01 10:21:52 -0700 (Fri, 01 Aug 2008) | 2 lines - These should no longer be needed now that TDI doesn't give back invalid IRPs - I'll look into the canceling issue later
by arty@svn.reactos.org
Author: arty Date: Fri Aug 1 16:07:09 2008 New Revision: 35019 URL:
http://svn.reactos.org/svn/reactos?rev=35019&view=rev
Log: Merge aicom-network-fixes up to r35014 | cgutman | 2008-08-01 10:21:52 -0700 (Fri, 01 Aug 2008) | 2 lines - These should no longer be needed now that TDI doesn't give back invalid IRPs - I'll look into the canceling issue later Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c trunk/reactos/drivers/network/afd/afd/bind.c trunk/reactos/drivers/network/afd/afd/connect.c trunk/reactos/drivers/network/afd/afd/context.c trunk/reactos/drivers/network/afd/afd/info.c trunk/reactos/drivers/network/afd/afd/listen.c trunk/reactos/drivers/network/afd/afd/lock.c trunk/reactos/drivers/network/afd/afd/main.c trunk/reactos/drivers/network/afd/afd/read.c trunk/reactos/drivers/network/afd/afd/select.c trunk/reactos/drivers/network/afd/afd/write.c trunk/reactos/drivers/network/afd/include/afd.h Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
============================================================================== --- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -279,17 +279,17 @@ if( Errno ) { switch (Status) { case STATUS_CANT_WAIT: *Errno = WSAEWOULDBLOCK; break; - case STATUS_TIMEOUT: + case STATUS_TIMEOUT: *Errno = WSAETIMEDOUT; break; case STATUS_SUCCESS: /* Return Number of bytes Read */ if( ReturnedBytes ) *ReturnedBytes = Received; break; - case STATUS_END_OF_FILE: *Errno = WSAESHUTDOWN; *ReturnedBytes = 0; break; + case STATUS_END_OF_FILE: *Errno = WSAESHUTDOWN; break; case STATUS_PENDING: *Errno = WSA_IO_PENDING; break; case STATUS_BUFFER_OVERFLOW: *Errno = WSAEMSGSIZE; break; - default: { + case STATUS_INVALID_CONNECTION: *Errno = WSAEAFNOSUPPORT; break; + default: DbgPrint("MSAFD: Error %x is unknown\n", Status); *Errno = WSAEINVAL; break; - } break; } } Modified: trunk/reactos/drivers/network/afd/afd/bind.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/bi…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -48,10 +48,10 @@ AFD_DbgPrint(MID_TRACE,("Called\n")); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( !(BindReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, - Irp, 0, NULL, FALSE ); + Irp, 0, NULL ); FCB->LocalAddress = TaCopyTransportAddress( &BindReq->Address ); @@ -61,7 +61,7 @@ if( NT_SUCCESS(Status) ) FCB->State = SOCKET_STATE_BOUND; - else return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, FALSE ); + else return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); AFD_DbgPrint(MID_TRACE,("FCB->Flags %x\n", FCB->Flags)); @@ -87,6 +87,6 @@ if( Status == STATUS_PENDING ) Status = STATUS_SUCCESS; } - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, TRUE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } Modified: trunk/reactos/drivers/network/afd/afd/connect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/co…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -71,7 +71,7 @@ /* I was wrong about this before as we can have pending writes to a not * yet connected socket */ - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); AFD_DbgPrint(MID_TRACE,("Irp->IoStatus.Status = %x\n", Irp->IoStatus.Status)); @@ -137,10 +137,10 @@ PAFD_CONNECT_INFO ConnectReq; AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( !(ConnectReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, - 0, NULL, FALSE ); + 0, NULL ); AFD_DbgPrint(MID_TRACE,("Connect request:\n")); #if 0 @@ -177,11 +177,10 @@ if( NT_SUCCESS(Status) ) FCB->State = SOCKET_STATE_BOUND; else - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, - TRUE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } else return UnlockAndMaybeComplete - ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL, TRUE ); + ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); } /* Drop through to SOCKET_STATE_BOUND */ case SOCKET_STATE_BOUND: @@ -228,5 +227,5 @@ break; } - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, TRUE ); -} + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); +} Modified: trunk/reactos/drivers/network/afd/afd/context.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/co…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/context.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/context.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -20,7 +20,7 @@ PAFD_FCB FCB = FileObject->FsContext; UINT ContextSize = IrpSp->Parameters.DeviceIoControl.OutputBufferLength; - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( FCB->ContextSize < ContextSize ) ContextSize = FCB->ContextSize; @@ -33,7 +33,7 @@ AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, FALSE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } NTSTATUS STDCALL @@ -43,7 +43,7 @@ PFILE_OBJECT FileObject = IrpSp->FileObject; PAFD_FCB FCB = FileObject->FsContext; - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( FCB->ContextSize < IrpSp->Parameters.DeviceIoControl.InputBufferLength ) { @@ -64,5 +64,5 @@ AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, FALSE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } Modified: trunk/reactos/drivers/network/afd/afd/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/in…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/info.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/info.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -26,7 +26,7 @@ _SEH_TRY { if( !SocketAcquireStateLock( FCB ) ) { - Status = LostSocket( Irp, FALSE ); + Status = LostSocket( Irp ); _SEH_YIELD(return Status); } @@ -69,7 +69,7 @@ AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, FALSE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } NTSTATUS STDCALL @@ -84,11 +84,11 @@ AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( FCB->AddressFile.Object == NULL) { return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0, - NULL, FALSE ); + NULL ); } Mdl = IoAllocateMdl @@ -159,5 +159,5 @@ AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, FALSE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } Modified: trunk/reactos/drivers/network/afd/afd/listen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/li…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -157,16 +157,16 @@ AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( !(ListenReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, - 0, NULL, FALSE ); + 0, NULL ); if( FCB->State != SOCKET_STATE_BOUND ) { Status = STATUS_UNSUCCESSFUL; AFD_DbgPrint(MID_TRACE,("Could not listen an unbound socket\n")); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, TRUE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } FCB->DelayedAccept = ListenReq->UseDelayedAcceptance; @@ -198,7 +198,7 @@ Status = STATUS_SUCCESS; AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, TRUE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } NTSTATUS AfdWaitForListen( PDEVICE_OBJECT DeviceObject, PIRP Irp, @@ -209,7 +209,7 @@ AFD_DbgPrint(MID_TRACE,("Called\n")); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( !IsListEmpty( &FCB->PendingConnections ) ) { PLIST_ENTRY PendingConn = FCB->PendingConnections.Flink; @@ -246,7 +246,7 @@ AFD_DbgPrint(MID_TRACE,("Called\n")); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); FCB->EventsFired &= ~AFD_EVENT_ACCEPT; Modified: trunk/reactos/drivers/network/afd/afd/lock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/lo…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/lock.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/lock.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -235,8 +235,7 @@ NTSTATUS NTAPI UnlockAndMaybeComplete ( PAFD_FCB FCB, NTSTATUS Status, PIRP Irp, UINT Information, - PIO_COMPLETION_ROUTINE Completion, - BOOL ShouldUnlock ) { + PIO_COMPLETION_ROUTINE Completion ) { if( Status == STATUS_PENDING ) { /* We should firstly mark this IRP as pending, because @@ -244,29 +243,25 @@ before we return from SocketStateUnlock(). */ IoMarkIrpPending( Irp ); SocketStateUnlock( FCB ); - if( ShouldUnlock ) - UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); } else { + if ( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); SocketStateUnlock( FCB ); Irp->IoStatus.Status = Status; Irp->IoStatus.Information = Information; if( Completion ) Completion( FCB->DeviceExt->DeviceObject, Irp, FCB ); - if( ShouldUnlock ) - UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); } return Status; } -NTSTATUS LostSocket( PIRP Irp, BOOL ShouldUnlockIrp ) { +NTSTATUS LostSocket( PIRP Irp ) { NTSTATUS Status = STATUS_INVALID_PARAMETER; AFD_DbgPrint(MIN_TRACE,("Called.\n")); Irp->IoStatus.Information = 0; Irp->IoStatus.Status = Status; - if( ShouldUnlockIrp ) - UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); + if ( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); IoCompleteRequest( Irp, IO_NO_INCREMENT ); return Status; } @@ -274,7 +269,7 @@ NTSTATUS LeaveIrpUntilLater( PAFD_FCB FCB, PIRP Irp, UINT Function ) { InsertTailList( &FCB->PendingIrpList[Function], &Irp->Tail.Overlay.ListEntry ); - return UnlockAndMaybeComplete( FCB, STATUS_PENDING, Irp, 0, NULL, FALSE ); + return UnlockAndMaybeComplete( FCB, STATUS_PENDING, Irp, 0, NULL ); } VOID SocketCalloutEnter( PAFD_FCB FCB ) { Modified: trunk/reactos/drivers/network/afd/afd/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ma…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -257,11 +257,11 @@ NTSTATUS Status; USHORT Flags = 0; - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( !(DisReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, - Irp, 0, NULL, FALSE ); + Irp, 0, NULL ); if (NULL == FCB->RemoteAddress) { @@ -274,7 +274,7 @@ if( !NT_SUCCESS(Status) || !ConnInfo ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, - Irp, 0, NULL, TRUE ); + Irp, 0, NULL ); } if( DisReq->DisconnectType & AFD_DISCONNECT_SEND ) @@ -294,7 +294,7 @@ if (ConnInfo) ExFreePool( ConnInfo ); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, TRUE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } static NTSTATUS STDCALL Modified: trunk/reactos/drivers/network/afd/afd/read.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/re…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -227,11 +227,6 @@ ASSERT_IRQL(APC_LEVEL); - if (Irp->Cancel) { - FCB->ReceiveIrp.InFlightRequest = NULL; - return STATUS_SUCCESS; - } - if( !SocketAcquireStateLock( FCB ) ) return Status; FCB->ReceiveIrp.InFlightRequest = NULL; @@ -273,21 +268,21 @@ AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( FCB->State != SOCKET_STATE_CONNECTED && FCB->State != SOCKET_STATE_CONNECTING ) { AFD_DbgPrint(MID_TRACE,("Called recv on wrong kind of socket (s%x)\n", FCB->State)); return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, - Irp, 0, NULL, FALSE ); + Irp, 0, NULL ); } if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS ) { AFD_DbgPrint(MID_TRACE,("Receive on connection-less sockets not implemented\n")); return UnlockAndMaybeComplete( FCB, STATUS_NOT_IMPLEMENTED, - Irp, 0, NULL, FALSE ); + Irp, 0, NULL ); } FCB->EventsFired &= ~AFD_EVENT_RECEIVE; @@ -295,7 +290,7 @@ if( !(RecvReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, - Irp, 0, NULL, FALSE ); + Irp, 0, NULL ); AFD_DbgPrint(MID_TRACE,("Recv flags %x\n", RecvReq->AfdFlags)); @@ -306,7 +301,7 @@ if( !RecvReq->BufferArray ) { return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION, - Irp, 0, NULL, TRUE ); + Irp, 0, NULL ); } Irp->IoStatus.Status = STATUS_PENDING; @@ -326,7 +321,7 @@ RemoveEntryList( &Irp->Tail.Overlay.ListEntry ); UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, FALSE ); return UnlockAndMaybeComplete( FCB, Status, Irp, - TotalBytesCopied, NULL, TRUE ); + TotalBytesCopied, NULL ); } else if( Status == STATUS_PENDING ) { AFD_DbgPrint(MID_TRACE,("Leaving read irp\n")); IoMarkIrpPending( Irp ); @@ -448,11 +443,6 @@ AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if (Irp->Cancel) { - FCB->ReceiveIrp.InFlightRequest = NULL; - return STATUS_SUCCESS; - } - if( !SocketAcquireStateLock( FCB ) ) return STATUS_UNSUCCESSFUL; FCB->ReceiveIrp.InFlightRequest = NULL; @@ -501,6 +491,7 @@ Status = NextIrp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; NextIrp->IoStatus.Information = DatagramRecv->Len; UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); + if ( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } else { AFD_DbgPrint(MID_TRACE,("Satisfying\n")); @@ -509,6 +500,7 @@ (PUINT)&NextIrp->IoStatus.Information ); AFD_DbgPrint(MID_TRACE,("Unlocking\n")); UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); + if ( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); AFD_DbgPrint(MID_TRACE,("Completing\n")); IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } @@ -557,17 +549,17 @@ AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); FCB->EventsFired &= ~AFD_EVENT_RECEIVE; /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) return UnlockAndMaybeComplete - ( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL, FALSE ); + ( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL ); if( !(RecvReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete - ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL, FALSE ); + ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); AFD_DbgPrint(MID_TRACE,("Recv flags %x\n", RecvReq->AfdFlags)); @@ -579,7 +571,7 @@ if( !RecvReq->BufferArray ) { /* access violation in userspace */ return UnlockAndMaybeComplete - ( FCB, STATUS_ACCESS_VIOLATION, Irp, 0, NULL, FALSE ); + ( FCB, STATUS_ACCESS_VIOLATION, Irp, 0, NULL ); } if( !IsListEmpty( &FCB->DatagramList ) ) { @@ -601,7 +593,7 @@ PollReeval( FCB->DeviceExt, FCB->FileObject ); return UnlockAndMaybeComplete - ( FCB, Status, Irp, RecvReq->BufferArray[0].len, NULL, TRUE ); + ( FCB, Status, Irp, RecvReq->BufferArray[0].len, NULL ); } else { Status = SatisfyPacketRecvRequest ( FCB, Irp, DatagramRecv, @@ -615,13 +607,13 @@ PollReeval( FCB->DeviceExt, FCB->FileObject ); return UnlockAndMaybeComplete - ( FCB, Status, Irp, Irp->IoStatus.Information, NULL, TRUE ); + ( FCB, Status, Irp, Irp->IoStatus.Information, NULL ); } } else if( RecvReq->AfdFlags & AFD_IMMEDIATE ) { AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); Status = STATUS_CANT_WAIT; PollReeval( FCB->DeviceExt, FCB->FileObject ); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL, TRUE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL ); } else { PollReeval( FCB->DeviceExt, FCB->FileObject ); return LeaveIrpUntilLater( FCB, Irp, FUNCTION_RECV ); Modified: trunk/reactos/drivers/network/afd/afd/select.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/se…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -276,14 +276,14 @@ if ( !EventSelectInfo ) { return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, - 0, NULL, FALSE ); + 0, NULL ); } AFD_DbgPrint(MID_TRACE,("Called (Event %x Triggers %x)\n", EventSelectInfo->EventObject, EventSelectInfo->Events)); if( !SocketAcquireStateLock( FCB ) ) { - return LostSocket( Irp, TRUE ); + return LostSocket( Irp ); } FCB->EventSelectTriggers = FCB->EventsFired = 0; @@ -309,7 +309,7 @@ AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); return UnlockAndMaybeComplete( FCB, STATUS_SUCCESS, Irp, - 0, NULL, TRUE ); + 0, NULL ); } NTSTATUS STDCALL @@ -324,18 +324,18 @@ if ( !EnumReq ) { return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, - 0, NULL, FALSE ); + 0, NULL ); } if( !SocketAcquireStateLock( FCB ) ) { - return LostSocket( Irp, TRUE ); + return LostSocket( Irp ); } EnumReq->PollEvents = FCB->PollState; RtlZeroMemory( EnumReq->EventStatus, sizeof(EnumReq->EventStatus) ); return UnlockAndMaybeComplete( FCB, STATUS_SUCCESS, Irp, - 0, NULL, TRUE ); + 0, NULL ); } /* * * NOTE ALWAYS CALLED AT DISPATCH_LEVEL * * */ Modified: trunk/reactos/drivers/network/afd/afd/write.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/wr…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -40,11 +40,6 @@ ASSERT_IRQL(APC_LEVEL); - if (Irp->Cancel) { - FCB->SendIrp.InFlightRequest = NULL; - return STATUS_SUCCESS; - } - if( !SocketAcquireStateLock( FCB ) ) return Status; FCB->SendIrp.InFlightRequest = NULL; @@ -73,6 +68,8 @@ NextIrp->IoStatus.Status = Status; NextIrp->IoStatus.Information = 0; + + if ( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } @@ -151,7 +148,7 @@ AFD_DbgPrint(MID_TRACE,("Dismissing request: %x\n", Status)); return UnlockAndMaybeComplete( FCB, Status, NextIrp, TotalBytesCopied, - NULL, TRUE ); + NULL ); } else if( NextIrp ) { AFD_DbgPrint(MID_TRACE,("Could not do any more with Irp %x\n", NextIrp)); @@ -173,11 +170,6 @@ AFD_DbgPrint(MID_TRACE,("Called, status %x, %d bytes used\n", Irp->IoStatus.Status, Irp->IoStatus.Information)); - - if (Irp->Cancel) { - FCB->SendIrp.InFlightRequest = NULL; - return STATUS_SUCCESS; - } /* It's ok if the FCB already died */ if( !SocketAcquireStateLock( FCB ) ) return STATUS_SUCCESS; @@ -211,7 +203,7 @@ AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); FCB->EventsFired &= ~AFD_EVENT_SEND; @@ -223,11 +215,11 @@ /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, - 0, NULL, FALSE ); + 0, NULL ); if( !(SendReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, - NULL, FALSE ); + NULL ); /* Must lock buffers before handing off user data */ SendReq->BufferArray = LockBuffers( SendReq->BufferArray, @@ -259,12 +251,12 @@ return UnlockAndMaybeComplete( FCB, Status, Irp, SendReq->BufferArray[0].len, - NULL, TRUE ); + NULL ); } if( !(SendReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete - ( FCB, STATUS_NO_MEMORY, Irp, TotalBytesCopied, NULL, FALSE ); + ( FCB, STATUS_NO_MEMORY, Irp, TotalBytesCopied, NULL ); AFD_DbgPrint(MID_TRACE,("Socket state %d\n", FCB->State)); @@ -272,7 +264,7 @@ if( SendReq->AfdFlags & AFD_IMMEDIATE ) { AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); return UnlockAndMaybeComplete - ( FCB, STATUS_CANT_WAIT, Irp, 0, NULL, TRUE ); + ( FCB, STATUS_CANT_WAIT, Irp, 0, NULL ); } else { AFD_DbgPrint(MID_TRACE,("Queuing request\n")); return LeaveIrpUntilLater( FCB, Irp, FUNCTION_SEND ); @@ -323,7 +315,7 @@ AFD_DbgPrint(MID_TRACE,("Empty send\n")); return UnlockAndMaybeComplete - ( FCB, Status, Irp, TotalBytesCopied, NULL, TRUE ); + ( FCB, Status, Irp, TotalBytesCopied, NULL ); } AFD_DbgPrint(MID_TRACE,("Completed %d bytes\n", TotalBytesCopied)); @@ -353,14 +345,14 @@ Status, TotalBytesCopied)); return UnlockAndMaybeComplete - ( FCB, Status, Irp, TotalBytesCopied, NULL, TRUE ); + ( FCB, Status, Irp, TotalBytesCopied, NULL ); } } if( SendReq->AfdFlags & AFD_IMMEDIATE ) { AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); return UnlockAndMaybeComplete - ( FCB, STATUS_CANT_WAIT, Irp, 0, NULL, TRUE ); + ( FCB, STATUS_CANT_WAIT, Irp, 0, NULL ); } else { AFD_DbgPrint(MID_TRACE,("Queuing request\n")); return LeaveIrpUntilLater( FCB, Irp, FUNCTION_SEND ); @@ -378,7 +370,7 @@ AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, FALSE ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); FCB->EventsFired &= ~AFD_EVENT_SEND; FCB->PollState &= ~AFD_EVENT_SEND; @@ -386,10 +378,10 @@ /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) return UnlockAndMaybeComplete - ( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL, FALSE ); + ( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL ); if( !(SendReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete - ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL, FALSE ); + ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); AFD_DbgPrint (MID_TRACE,("RemoteAddress #%d Type %d\n", @@ -426,6 +418,6 @@ AFD_DbgPrint(MID_TRACE,("Dismissing request: %x\n", Status)); return UnlockAndMaybeComplete - ( FCB, Status, Irp, SendReq->BufferArray[0].len, NULL, TRUE ); + ( FCB, Status, Irp, SendReq->BufferArray[0].len, NULL ); } Modified: trunk/reactos/drivers/network/afd/include/afd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/includ…
============================================================================== --- trunk/reactos/drivers/network/afd/include/afd.h [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/include/afd.h [iso-8859-1] Fri Aug 1 16:07:09 2008 @@ -206,10 +206,9 @@ NTSTATUS NTAPI UnlockAndMaybeComplete ( PAFD_FCB FCB, NTSTATUS Status, PIRP Irp, UINT Information, - PIO_COMPLETION_ROUTINE Completion, - BOOL ShouldUnlockIrp ); + PIO_COMPLETION_ROUTINE Completion ); VOID SocketStateUnlock( PAFD_FCB FCB ); -NTSTATUS LostSocket( PIRP Irp, BOOL ShouldUnlockIrp ); +NTSTATUS LostSocket( PIRP Irp ); PAFD_HANDLE LockHandles( PAFD_HANDLE HandleArray, UINT HandleCount ); VOID UnlockHandles( PAFD_HANDLE HandleArray, UINT HandleCount ); PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp );
16 years, 4 months
1
0
0
0
[sginsberg] 35017: - Use MmAllocateMemoryWithType instead of deprecated MmAllocateMemory for the ARM Shared Heap allocation - Use heap routines in i386 and powerpc branches for temporary memory
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Aug 1 12:50:17 2008 New Revision: 35017 URL:
http://svn.reactos.org/svn/reactos?rev=35017&view=rev
Log: - Use MmAllocateMemoryWithType instead of deprecated MmAllocateMemory for the ARM Shared Heap allocation - Use heap routines in i386 and powerpc branches for temporary memory Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c [iso-8859-1] Fri Aug 1 12:50:17 2008 @@ -1052,7 +1052,7 @@ // // Allocate the ARM Shared Heap // - ArmSharedHeap = MmAllocateMemory(PAGE_SIZE); + ArmSharedHeap = MmAllocateMemoryWithType(PAGE_SIZE, LoaderOsloaderHeap); ArmSharedHeapSize = 0; if (!ArmSharedHeap) return; Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c [iso-8859-1] Fri Aug 1 12:50:17 2008 @@ -173,7 +173,7 @@ /* Set 'Configuration Data' value */ Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors) + 2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + Table->Size; - PartialResourceList = MmAllocateMemory(Size); + PartialResourceList = MmHeapAlloc(Size); if (PartialResourceList == NULL) { DbgPrint((DPRINT_HWDETECT, @@ -203,7 +203,7 @@ /* Set 'Configuration Data' value */ FldrSetConfigurationData(TableKey, PartialResourceList, Size); - MmFreeMemory(PartialResourceList); + MmHeapFree(PartialResourceList); } } @@ -246,7 +246,7 @@ /* Set 'Configuration Data' value */ Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors); - PartialResourceList = MmAllocateMemory(Size); + PartialResourceList = MmHeapAlloc(Size); if (PartialResourceList == NULL) { DbgPrint((DPRINT_HWDETECT, @@ -259,7 +259,7 @@ /* Set 'Configuration Data' value */ FldrSetConfigurationData(BiosKey, PartialResourceList, Size); - MmFreeMemory(PartialResourceList); + MmHeapFree(PartialResourceList); DetectPciIrqRoutingTable(BiosKey); @@ -288,7 +288,7 @@ PartialDescriptors) + sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + sizeof(PCI_REGISTRY_INFO); - PartialResourceList = MmAllocateMemory(Size); + PartialResourceList = MmHeapAlloc(Size); if (!PartialResourceList) { DbgPrint((DPRINT_HWDETECT, @@ -311,14 +311,14 @@ /* Set 'Configuration Data' value */ FldrSetConfigurationData(BusKey, PartialResourceList, Size); - MmFreeMemory(PartialResourceList); + MmHeapFree(PartialResourceList); } else { /* Set 'Configuration Data' value */ Size = FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors); - PartialResourceList = MmAllocateMemory(Size); + PartialResourceList = MmHeapAlloc(Size); if (!PartialResourceList) { DbgPrint((DPRINT_HWDETECT, @@ -331,7 +331,7 @@ /* Set 'Configuration Data' value */ FldrSetConfigurationData(BusKey, PartialResourceList, Size); - MmFreeMemory(PartialResourceList); + MmHeapFree(PartialResourceList); } /* Increment bus number */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Fri Aug 1 12:50:17 2008 @@ -42,7 +42,7 @@ /* Set 'Configuration Data' value */ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) + sizeof(CM_DISK_GEOMETRY_DEVICE_DATA); - PartialResourceList = MmAllocateMemory(Size); + PartialResourceList = MmHeapAlloc(Size); if (PartialResourceList == NULL) { DbgPrint((DPRINT_HWDETECT, @@ -77,7 +77,7 @@ else { DbgPrint((DPRINT_HWDETECT, "Reading disk geometry failed\n")); - MmFreeMemory(PartialResourceList); + MmHeapFree(PartialResourceList); return; } DbgPrint((DPRINT_HWDETECT, @@ -89,7 +89,7 @@ DiskGeometry->BytesPerSector)); FldrSetConfigurationData(DiskKey, PartialResourceList, Size); - MmFreeMemory(PartialResourceList); + MmHeapFree(PartialResourceList); } @@ -225,7 +225,7 @@ /* Allocate resource descriptor */ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) + sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount; - PartialResourceList = MmAllocateMemory(Size); + PartialResourceList = MmHeapAlloc(Size); if (PartialResourceList == NULL) { DbgPrint((DPRINT_HWDETECT, @@ -268,7 +268,7 @@ /* Set 'Configuration Data' value */ FldrSetConfigurationData(SystemKey, PartialResourceList, Size); - MmFreeMemory(PartialResourceList); + MmHeapFree(PartialResourceList); /* Create and fill subkey for each harddisk */ for (i = 0; i < DiskCount; i++) @@ -323,7 +323,7 @@ /* Set 'Configuration Data' value */ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); - PartialResourceList = MmAllocateMemory(Size); + PartialResourceList = MmHeapAlloc(Size); if (PartialResourceList == NULL) { DbgPrint((DPRINT_HWDETECT, @@ -339,7 +339,7 @@ /* Set 'Configuration Data' value */ FldrSetConfigurationData(BusKey, PartialResourceList, Size); - MmFreeMemory(PartialResourceList); + MmHeapFree(PartialResourceList); /* Detect ISA/BIOS devices */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c [iso-8859-1] Fri Aug 1 12:50:17 2008 @@ -459,7 +459,7 @@ phnum = ehdr.e_phnum; shsize = ehdr.e_shentsize; shnum = ehdr.e_shnum; - sptr = (PCHAR)MmAllocateMemory(shnum * shsize); + sptr = (PCHAR)MmHeapAlloc(shnum * shsize); /* Read section headers */ FsSetFilePointer(KernelImage, ehdr.e_shoff); @@ -560,14 +560,14 @@ if (!ELF_SECTION(targetSection)->sh_addr) continue; - RelocSection = MmAllocateMemory(shdr->sh_size); + RelocSection = MmHeapAlloc(shdr->sh_size); FsSetFilePointer(KernelImage, relstart); FsReadFile(KernelImage, shdr->sh_size, NULL, RelocSection); /* Get the symbol section */ shdr = ELF_SECTION(shdr->sh_link); - SymbolSection = MmAllocateMemory(shdr->sh_size); + SymbolSection = MmHeapAlloc(shdr->sh_size); FsSetFilePointer(KernelImage, shdr->sh_offset); FsReadFile(KernelImage, shdr->sh_size, NULL, SymbolSection); @@ -642,11 +642,11 @@ #endif } - MmFreeMemory(SymbolSection); - MmFreeMemory(RelocSection); - } - - MmFreeMemory(sptr); + MmHeapFree(SymbolSection); + MmHeapFree(RelocSection); + } + + MmHeapFree(sptr); ModuleData->ModStart = (ULONG)MemLoadAddr; /* Increase the next Load Base */
16 years, 4 months
1
0
0
0
[mkupfer] 35016: - extended range for calendar view for years 1900-9999, each selectable year/month combination creates a correct month view - special case september 1752 partly prepared, but disabled as long as unneeded ; -) - enable via #define WITH_1752
by mkupfer@svn.reactos.org
Author: mkupfer Date: Fri Aug 1 12:43:53 2008 New Revision: 35016 URL:
http://svn.reactos.org/svn/reactos?rev=35016&view=rev
Log: - extended range for calendar view for years 1900-9999, each selectable year/month combination creates a correct month view - special case september 1752 partly prepared, but disabled as long as unneeded ;-) - enable via #define WITH_1752 Modified: trunk/reactos/dll/cpl/timedate/monthcal.c Modified: trunk/reactos/dll/cpl/timedate/monthcal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/monthcal.…
============================================================================== --- trunk/reactos/dll/cpl/timedate/monthcal.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/timedate/monthcal.c [iso-8859-1] Fri Aug 1 12:43:53 2008 @@ -75,6 +75,19 @@ return Ret; } +/* + * for the year range 1..9999 + * return 1 if is leap year otherwise 0 + */ +static WORD LeapYear(IN WORD Year) +{ + return +#ifdef WITH_1752 + (Year <= 1752) ? !(Year % 4) : +#endif + !(Year % 4) && ((Year % 100) || !(Year % 400)); +} + static WORD MonthCalMonthLength(IN WORD Month, IN WORD Year) @@ -82,9 +95,16 @@ const BYTE MonthDays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0}; if(Month == 2) - return MonthDays[Month - 1] + ((Year % 400 == 0) ? 1 : ((Year % 100 != 0) && (Year % 4 == 0)) ? 1 : 0); + return MonthDays[Month - 1] + LeapYear(Year); else - return MonthDays[Month - 1]; + { +#ifdef WITH_1752 + if ((Year == 1752) && (Month == 9)) + return 19; // special case: September 1752 has no 3rd-13th + else +#endif + return MonthDays[Month - 1]; + } } static WORD @@ -134,7 +154,7 @@ if (Month < 1 || Month > 12 || Day == 0 || Day > MonthCalMonthLength(Month, Year) || - Year < 1980 || Year > 2099) + Year < 1899 || Year > 9999) { return FALSE; }
16 years, 4 months
1
0
0
0
[jmorlan] 35015: - IntRemoveMenuItem: Fix bug involving deleting item from submenu. (Bug 3292) - IntFreeMenuItem: Remove code for removing item from list - the only caller that "used" this was IntRemoveMenuItem, which actually removes the item itself. - IntInsertMenuItemToList, IntEnableMenuItem, IntCheckMenuItem, IntHiliteMenuItem: Simplify some more redundant code.
by jmorlan@svn.reactos.org
Author: jmorlan Date: Fri Aug 1 12:40:56 2008 New Revision: 35015 URL:
http://svn.reactos.org/svn/reactos?rev=35015&view=rev
Log: - IntRemoveMenuItem: Fix bug involving deleting item from submenu. (Bug 3292) - IntFreeMenuItem: Remove code for removing item from list - the only caller that "used" this was IntRemoveMenuItem, which actually removes the item itself. - IntInsertMenuItemToList, IntEnableMenuItem, IntCheckMenuItem, IntHiliteMenuItem: Simplify some more redundant code. Modified: trunk/reactos/subsystems/win32/win32k/include/menu.h trunk/reactos/subsystems/win32/win32k/ntuser/menu.c Modified: trunk/reactos/subsystems/win32/win32k/include/menu.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/menu.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/menu.h [iso-8859-1] Fri Aug 1 12:40:56 2008 @@ -50,8 +50,7 @@ UserDereferenceObject(MenuObj) BOOL FASTCALL -IntFreeMenuItem(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, - BOOL RemoveFromList, BOOL bRecurse); +IntFreeMenuItem(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, BOOL bRecurse); BOOL FASTCALL IntRemoveMenuItem(PMENU_OBJECT MenuObject, UINT uPosition, UINT uFlags, Modified: trunk/reactos/subsystems/win32/win32k/ntuser/menu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/menu.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/menu.c [iso-8859-1] Fri Aug 1 12:40:56 2008 @@ -206,27 +206,9 @@ } BOOL FASTCALL -IntFreeMenuItem(PMENU_OBJECT Menu, PMENU_ITEM MenuItem, - BOOL RemoveFromList, BOOL bRecurse) +IntFreeMenuItem(PMENU_OBJECT Menu, PMENU_ITEM MenuItem, BOOL bRecurse) { FreeMenuText(MenuItem); - if(RemoveFromList) - { - PMENU_ITEM CurItem = Menu->MenuItemList; - while(CurItem) - { - if (CurItem->Next == MenuItem) - { - CurItem->Next = MenuItem->Next; - break; - } - else - { - CurItem = CurItem->Next; - } - } - Menu->MenuInfo.MenuItemCount--; - } if(bRecurse && MenuItem->hSubMenu) { PMENU_OBJECT SubMenu; @@ -249,7 +231,7 @@ BOOL bRecurse) { PMENU_ITEM PrevMenuItem, MenuItem; - if(IntGetMenuItemByFlag(Menu, uPosition, uFlags, NULL, &MenuItem, + if(IntGetMenuItemByFlag(Menu, uPosition, uFlags, &Menu, &MenuItem, &PrevMenuItem) > -1) { if(MenuItem) @@ -260,7 +242,8 @@ { Menu->MenuItemList = MenuItem->Next; } - return IntFreeMenuItem(Menu, MenuItem, TRUE, bRecurse); + Menu->MenuInfo.MenuItemCount--; + return IntFreeMenuItem(Menu, MenuItem, bRecurse); } } return FALSE; @@ -275,7 +258,7 @@ while(CurItem) { NextItem = CurItem->Next; - IntFreeMenuItem(Menu, CurItem, FALSE, bRecurse); + IntFreeMenuItem(Menu, CurItem, bRecurse); CurItem = NextItem; res++; } @@ -651,56 +634,25 @@ UINT npos = 0; CurItem = Menu->MenuItemList; - if(pos <= -1) - { - while(CurItem) - { - LastItem = CurItem; - CurItem = CurItem->Next; - npos++; - } + while(CurItem && (pos != 0)) + { + LastItem = CurItem; + CurItem = CurItem->Next; + pos--; + npos++; + } + + if(LastItem) + { + /* insert the item after LastItem */ + LastItem->Next = MenuItem; } else { - while(CurItem && (pos > 0)) - { - LastItem = CurItem; - CurItem = CurItem->Next; - pos--; - npos++; - } - } - - if(CurItem) - { - if(LastItem) - { - /* insert the item before CurItem */ - MenuItem->Next = LastItem->Next; - LastItem->Next = MenuItem; - } - else - { - /* insert at the beginning */ - Menu->MenuItemList = MenuItem; - MenuItem->Next = CurItem; - } - } - else - { - if(LastItem) - { - /* append item */ - LastItem->Next = MenuItem; - MenuItem->Next = NULL; - } - else - { - /* insert first item */ - Menu->MenuItemList = MenuItem; - MenuItem->Next = NULL; - } - } + /* insert at the beginning */ + Menu->MenuItemList = MenuItem; + } + MenuItem->Next = CurItem; Menu->MenuInfo.MenuItemCount++; return npos; @@ -1011,29 +963,18 @@ if(uEnable & MF_DISABLED) { - if(!(MenuItem->fState & MF_DISABLED)) - MenuItem->fState |= MF_DISABLED; + MenuItem->fState |= MF_DISABLED; + MenuItem->fState |= uEnable & MF_GRAYED; + } + else + { if(uEnable & MF_GRAYED) { - if(!(MenuItem->fState & MF_GRAYED)) - MenuItem->fState |= MF_GRAYED; - } - } - else - { - if(uEnable & MF_GRAYED) - { - if(!(MenuItem->fState & MF_GRAYED)) - MenuItem->fState |= MF_GRAYED; - if(!(MenuItem->fState & MF_DISABLED)) - MenuItem->fState |= MF_DISABLED; + MenuItem->fState |= (MF_GRAYED | MF_DISABLED); } else { - if(MenuItem->fState & MF_DISABLED) - MenuItem->fState ^= MF_DISABLED; - if(MenuItem->fState & MF_GRAYED) - MenuItem->fState ^= MF_GRAYED; + MenuItem->fState &= ~(MF_DISABLED | MF_GRAYED); } } @@ -1155,13 +1096,11 @@ res = (DWORD)(MenuItem->fState & MF_CHECKED); if(uCheck & MF_CHECKED) { - if(!(MenuItem->fState & MF_CHECKED)) - MenuItem->fState |= MF_CHECKED; + MenuItem->fState |= MF_CHECKED; } else { - if(MenuItem->fState & MF_CHECKED) - MenuItem->fState ^= MF_CHECKED; + MenuItem->fState &= ~MF_CHECKED; } return (DWORD)res; @@ -1180,13 +1119,11 @@ if(uHilite & MF_HILITE) { - if(!(MenuItem->fState & MF_HILITE)) - MenuItem->fState |= MF_HILITE; + MenuItem->fState |= MF_HILITE; } else { - if(MenuItem->fState & MF_HILITE) - MenuItem->fState ^= MF_HILITE; + MenuItem->fState &= ~MF_HILITE; } /* FIXME - update the window's menu */ @@ -1204,8 +1141,7 @@ { while(MenuItem) { - if(MenuItem->fState & MFS_DEFAULT) - MenuItem->fState ^= MFS_DEFAULT; + MenuItem->fState &= ~MFS_DEFAULT; MenuItem = MenuItem->Next; } return TRUE; @@ -1218,14 +1154,12 @@ { if(pos == uItem) { - if(!(MenuItem->fState & MFS_DEFAULT)) - MenuItem->fState |= MFS_DEFAULT; + MenuItem->fState |= MFS_DEFAULT; ret = TRUE; } else { - if(MenuItem->fState & MFS_DEFAULT) - MenuItem->fState ^= MFS_DEFAULT; + MenuItem->fState &= ~MFS_DEFAULT; } pos++; MenuItem = MenuItem->Next; @@ -1237,14 +1171,12 @@ { if(!ret && (MenuItem->wID == uItem)) { - if(!(MenuItem->fState & MFS_DEFAULT)) - MenuItem->fState |= MFS_DEFAULT; + MenuItem->fState |= MFS_DEFAULT; ret = TRUE; } else { - if(MenuItem->fState & MFS_DEFAULT) - MenuItem->fState ^= MFS_DEFAULT; + MenuItem->fState &= ~MFS_DEFAULT; } MenuItem = MenuItem->Next; }
16 years, 4 months
1
0
0
0
[cgutman] 35014: - These should no longer be needed now that TDI doesn't give back invalid IRPs - I'll look into the canceling issue later
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Aug 1 12:21:52 2008 New Revision: 35014 URL:
http://svn.reactos.org/svn/reactos?rev=35014&view=rev
Log: - These should no longer be needed now that TDI doesn't give back invalid IRPs - I'll look into the canceling issue later Modified: branches/aicom-network-fixes/drivers/network/afd/afd/read.c branches/aicom-network-fixes/drivers/network/afd/afd/write.c Modified: branches/aicom-network-fixes/drivers/network/afd/afd/read.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/read.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/read.c [iso-8859-1] Fri Aug 1 12:21:52 2008 @@ -227,11 +227,6 @@ ASSERT_IRQL(APC_LEVEL); - if (Irp->Cancel) { - FCB->ReceiveIrp.InFlightRequest = NULL; - return STATUS_SUCCESS; - } - if( !SocketAcquireStateLock( FCB ) ) return Status; FCB->ReceiveIrp.InFlightRequest = NULL; @@ -447,11 +442,6 @@ UINT DGSize = Irp->IoStatus.Information + sizeof( AFD_STORED_DATAGRAM ); AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - - if (Irp->Cancel) { - FCB->ReceiveIrp.InFlightRequest = NULL; - return STATUS_SUCCESS; - } if( !SocketAcquireStateLock( FCB ) ) return STATUS_UNSUCCESSFUL; Modified: branches/aicom-network-fixes/drivers/network/afd/afd/write.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/write.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/write.c [iso-8859-1] Fri Aug 1 12:21:52 2008 @@ -40,11 +40,6 @@ ASSERT_IRQL(APC_LEVEL); - if (Irp->Cancel) { - FCB->SendIrp.InFlightRequest = NULL; - return STATUS_SUCCESS; - } - if( !SocketAcquireStateLock( FCB ) ) return Status; FCB->SendIrp.InFlightRequest = NULL; @@ -176,11 +171,6 @@ Irp->IoStatus.Status, Irp->IoStatus.Information)); - if (Irp->Cancel) { - FCB->SendIrp.InFlightRequest = NULL; - return STATUS_SUCCESS; - } - /* It's ok if the FCB already died */ if( !SocketAcquireStateLock( FCB ) ) return STATUS_SUCCESS;
16 years, 4 months
1
0
0
0
[jmorlan] 35013: - PspSetPrimaryToken: Fix some incorrect object dereferencing. - WlxStartApplication: Fix handle leaks. - Make userinit.exe exit when it's done everything. No need to wait for explorer to exit first.
by jmorlan@svn.reactos.org
Author: jmorlan Date: Fri Aug 1 11:54:14 2008 New Revision: 35013 URL:
http://svn.reactos.org/svn/reactos?rev=35013&view=rev
Log: - PspSetPrimaryToken: Fix some incorrect object dereferencing. - WlxStartApplication: Fix handle leaks. - Make userinit.exe exit when it's done everything. No need to wait for explorer to exit first. Modified: trunk/reactos/base/system/userinit/userinit.c trunk/reactos/dll/win32/msgina/msgina.c trunk/reactos/ntoskrnl/ps/security.c Modified: trunk/reactos/base/system/userinit/userinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/userinit/useri…
============================================================================== --- trunk/reactos/base/system/userinit/userinit.c [iso-8859-1] (original) +++ trunk/reactos/base/system/userinit/userinit.c [iso-8859-1] Fri Aug 1 11:54:14 2008 @@ -263,7 +263,6 @@ StartAutoApplications(CSIDL_STARTUP); StartAutoApplications(CSIDL_COMMON_STARTUP); - WaitForSingleObject(pi.hProcess, INFINITE); CloseHandle(pi.hProcess); CloseHandle(pi.hThread); return TRUE; Modified: trunk/reactos/dll/win32/msgina/msgina.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?…
============================================================================== --- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Fri Aug 1 11:54:14 2008 @@ -247,6 +247,8 @@ CurrentDirectory, &StartupInfo, &ProcessInformation); + CloseHandle(ProcessInformation.hProcess); + CloseHandle(ProcessInformation.hThread); CloseHandle(hAppToken); if (!ret) WARN("CreateProcessAsUserW() failed with error %lu\n", GetLastError()); Modified: trunk/reactos/ntoskrnl/ps/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ps/security.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/security.c [iso-8859-1] Fri Aug 1 11:54:14 2008 @@ -255,7 +255,7 @@ PreviousMode)) { /* Failed, dereference */ - if (TokenHandle) ObDereferenceObject(Token); + if (TokenHandle) ObDereferenceObject(NewToken); return STATUS_PRIVILEGE_NOT_HELD; } } @@ -311,13 +311,10 @@ STANDARD_RIGHTS_ALL | PROCESS_SET_QUOTA); } - - /* Dereference the process */ - ObDereferenceObject(Process); } /* Dereference the token */ - if (Token) ObDereferenceObject(NewToken); + if (TokenHandle) ObDereferenceObject(NewToken); return Status; }
16 years, 4 months
1
0
0
0
[sginsberg] 35012: - Use macros instead of magic "1" and "2" for Setup Loader Block Flags - Initialize AcpiTableDetected to FALSE - Misc header fixes
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Aug 1 11:47:17 2008 New Revision: 35012 URL:
http://svn.reactos.org/svn/reactos?rev=35012&view=rev
Log: - Use macros instead of magic "1" and "2" for Setup Loader Block Flags - Initialize AcpiTableDetected to FALSE - Misc header fixes Modified: trunk/reactos/include/reactos/arc/arc.h trunk/reactos/include/reactos/arc/setupblk.h trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ke/freeldr.c Modified: trunk/reactos/include/reactos/arc/arc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arc/arc.h?…
============================================================================== --- trunk/reactos/include/reactos/arc/arc.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/arc/arc.h [iso-8859-1] Fri Aug 1 11:47:17 2008 @@ -412,7 +412,8 @@ { ULONG FirmwareTypeEfi:1; ULONG Reserved:31; - union { + union + { EFI_FIRMWARE_INFORMATION EfiInformation; PCAT_FIRMWARE_INFORMATION PcatInformation; } u; @@ -447,7 +448,7 @@ { I386_LOADER_BLOCK I386; ALPHA_LOADER_BLOCK Alpha; - IA64_LOADER_BLOCK Ia64; + IA64_LOADER_BLOCK IA64; PPC_LOADER_BLOCK PowerPC; ARM_LOADER_BLOCK Arm; } u; Modified: trunk/reactos/include/reactos/arc/setupblk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arc/setupb…
============================================================================== --- trunk/reactos/include/reactos/arc/setupblk.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/arc/setupblk.h [iso-8859-1] Fri Aug 1 11:47:17 2008 @@ -1,5 +1,11 @@ #ifndef _SETUPBLK_ #define _SETUPBLK_ + +// +// Setup Flags +// +#define SETUPLDR_TEXT_MODE 0x1 +#define SETUPLDR_REMOTE_BOOT 0x2 // // Type of file described in DETECTED_DEVICE_FILE Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=350…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Fri Aug 1 11:47:17 2008 @@ -869,10 +869,10 @@ if (LoaderBlock->SetupLdrBlock) { /* Check if this is text-mode setup */ - if (LoaderBlock->SetupLdrBlock->Flags & 1) ExpInTextModeSetup = TRUE; + if (LoaderBlock->SetupLdrBlock->Flags & SETUPLDR_TEXT_MODE) ExpInTextModeSetup = TRUE; /* Check if this is network boot */ - if (LoaderBlock->SetupLdrBlock->Flags & 2) + if (LoaderBlock->SetupLdrBlock->Flags & SETUPLDR_REMOTE_BOOT) { /* Set variable */ IoRemoteBootClient = TRUE; Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] Fri Aug 1 11:47:17 2008 @@ -31,7 +31,7 @@ /* FreeLDR Loader Data */ PROS_LOADER_PARAMETER_BLOCK KeRosLoaderBlock; -BOOLEAN AcpiTableDetected; +BOOLEAN AcpiTableDetected = FALSE; ADDRESS_RANGE KeMemoryMap[64]; ULONG KeMemoryMapRangeCount; @@ -1187,7 +1187,7 @@ if (LoaderBlock->SetupLdrBlock) { /* All we'll setup right now is the flag for text-mode setup */ - LoaderBlock->SetupLdrBlock->Flags = 1; + LoaderBlock->SetupLdrBlock->Flags = SETUPLDR_TEXT_MODE; } /* Make a copy of the command line */
16 years, 4 months
1
0
0
0
← Newer
1
...
80
81
82
83
84
85
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200