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
January 2011
----- 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
20 participants
336 discussions
Start a n
N
ew thread
[tkreuzer] 50554: [PSDK] Fix include of windows.h from rpc.h
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jan 29 14:41:18 2011 New Revision: 50554 URL:
http://svn.reactos.org/svn/reactos?rev=50554&view=rev
Log: [PSDK] Fix include of windows.h from rpc.h Modified: branches/cmake-bringup/include/psdk/rpc.h Modified: branches/cmake-bringup/include/psdk/rpc.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/psdk/rpc.…
============================================================================== --- branches/cmake-bringup/include/psdk/rpc.h [iso-8859-1] (original) +++ branches/cmake-bringup/include/psdk/rpc.h [iso-8859-1] Sat Jan 29 14:41:18 2011 @@ -1,14 +1,8 @@ #if !defined( RPC_NO_WINDOWS_H ) && !defined( MAC ) && !defined( _MAC ) -#if defined (_OLE32_) -#ifndef RC_INVOKED -#include <stdarg.h> -#endif -#include <windef.h> -#include <winbase.h> -#else +#ifndef _INC_WINDOWS #include <windows.h> -#endif +#endif /* _INC_WINDOWS */ #endif #ifndef RC_INVOKED
13 years, 10 months
1
0
0
0
[tkreuzer] 50553: [CMAKE] Don't compile w32kdll and w32knapi test on MSVC
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jan 29 14:08:44 2011 New Revision: 50553 URL:
http://svn.reactos.org/svn/reactos?rev=50553&view=rev
Log: [CMAKE] Don't compile w32kdll and w32knapi test on MSVC Modified: trunk/rostests/apitests/CMakeLists.txt Modified: trunk/rostests/apitests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/CMakeLists.txt?r…
============================================================================== --- trunk/rostests/apitests/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/CMakeLists.txt [iso-8859-1] Sat Jan 29 14:08:44 2011 @@ -6,9 +6,11 @@ add_subdirectory(ntdll) add_subdirectory(user32) +if(NOT MSVC) if(ARCH MATCHES i386) add_subdirectory(w32kdll) add_subdirectory(w32knapi) endif() +endif() add_subdirectory(ws2_32)
13 years, 10 months
1
0
0
0
[fireball] 50552: [TDI] - Oleg Baikalow: Finish CTE timers. CTE implementation is complete now.
by fireball@svn.reactos.org
Author: fireball Date: Sat Jan 29 14:03:41 2011 New Revision: 50552 URL:
http://svn.reactos.org/svn/reactos?rev=50552&view=rev
Log: [TDI] - Oleg Baikalow: Finish CTE timers. CTE implementation is complete now. Modified: trunk/reactos/drivers/network/tdi/cte/timer.c trunk/reactos/drivers/network/tdi/misc/main.c Modified: trunk/reactos/drivers/network/tdi/cte/timer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/cte/ti…
============================================================================== --- trunk/reactos/drivers/network/tdi/cte/timer.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tdi/cte/timer.c [iso-8859-1] Sat Jan 29 14:03:41 2011 @@ -10,57 +10,109 @@ #include <ntddk.h> +/* FIXME: Move to a common header! */ +struct _CTE_DELAYED_EVENT; +typedef void (*CTE_WORKER_ROUTINE)(struct _CTE_DELAYED_EVENT *, void *Context); + +typedef struct _CTE_TIMER +{ + BOOLEAN Queued; + KSPIN_LOCK Lock; + CTE_WORKER_ROUTINE Callback; + PVOID Context; + KDPC Dpc; + KTIMER Timer; +} CTE_TIMER, *PCTE_TIMER; + +LONG CteTimeIncrement; + +/* FUNCTIONS *****************************************************************/ + +VOID +NTAPI +InternalDpcRoutine(PKDPC Dpc, + PVOID Context, + PVOID SystemArgument1, + PVOID SystemArgument2) +{ + PCTE_TIMER Timer = (PCTE_TIMER)Context; + + /* Call our registered callback */ + Timer->Callback((struct _CTE_DELAYED_EVENT *)Timer, Timer->Context); +} + /* - * @unimplemented + * @implemented */ VOID NTAPI -CTEInitTimer ( - ULONG Unknown0 - ) +CTEInitTimer(PCTE_TIMER Timer) { + /* Zero all fields */ + RtlZeroMemory(Timer, sizeof(CTE_TIMER)); + + /* Create a DPC and a timer */ + KeInitializeDpc(&Timer->Dpc, InternalDpcRoutine, Timer); + KeInitializeTimer(&Timer->Timer); +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +CTEStartTimer(PCTE_TIMER Timer, + ULONG DueTimeShort, + CTE_WORKER_ROUTINE Callback, + PVOID Context) +{ + LARGE_INTEGER DueTime; + + /* Make sure a callback was provided */ + ASSERT(Callback); + + /* We need to convert due time, because DueTimeShort is in ms, + but NT timer expects 100s of ns, negative one */ + DueTime.QuadPart = -Int32x32To64(DueTimeShort, 10000); + + /* Set other timer members */ + Timer->Callback = Callback; + Timer->Context = Context; + + /* Set the timer */ + KeSetTimer(&Timer->Timer, DueTime, &Timer->Dpc); + + return TRUE; } /* - * @unimplemented + * @implemented + */ +ULONG +NTAPI +CTESystemUpTime(VOID) +{ + LARGE_INTEGER Ticks; + + /* Get the tick count */ + KeQueryTickCount(&Ticks); + + /* Convert to 100s of ns and then to ms*/ + Ticks.QuadPart = (Ticks.QuadPart * CteTimeIncrement) / 10000ULL; + + return Ticks.LowPart; +} + +/* + * @implemented */ BOOLEAN NTAPI -CTEInitialize ( - VOID - ) +CTEInitialize(VOID) { - /* FIXME: what should it initialize? */ - return TRUE; -} - -/* - * @unimplemented - */ -BOOLEAN -NTAPI -CTEStartTimer ( - ULONG Unknown0, - ULONG Unknown1, - ULONG Unknown2, - ULONG Unknown3 - ) -{ - return FALSE; -} - - -/* - * @unimplemented - */ -ULONG -NTAPI -CTESystemUpTime ( - VOID - ) -{ - return 0; + /* Just return success */ + return TRUE; } /* EOF */ Modified: trunk/reactos/drivers/network/tdi/misc/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/misc/m…
============================================================================== --- trunk/reactos/drivers/network/tdi/misc/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tdi/misc/main.c [iso-8859-1] Sat Jan 29 14:03:41 2011 @@ -1,17 +1,20 @@ -/* $Id$ - * +/* * DESCRIPTION: Entry point for TDI.SYS + * (c) Captain Obvious */ #include <ntddk.h> +extern LONG CteTimeIncrement; + NTSTATUS NTAPI -DriverEntry ( - IN PDRIVER_OBJECT DriverObject, - IN PUNICODE_STRING RegistryPath - ) +DriverEntry(IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath) { - return STATUS_UNSUCCESSFUL; + /* Initialize the time increment for CTE timers */ + CteTimeIncrement = KeQueryTimeIncrement(); + + return STATUS_SUCCESS; }
13 years, 10 months
1
0
0
0
[fireball] 50551: [TDI] - Move CTE routines into corresponding events.c and timer.c source code files before further applying Oleg's patches.
by fireball@svn.reactos.org
Author: fireball Date: Sat Jan 29 13:07:06 2011 New Revision: 50551 URL:
http://svn.reactos.org/svn/reactos?rev=50551&view=rev
Log: [TDI] - Move CTE routines into corresponding events.c and timer.c source code files before further applying Oleg's patches. Added: trunk/reactos/drivers/network/tdi/cte/events.c (with props) trunk/reactos/drivers/network/tdi/cte/timer.c (with props) Removed: trunk/reactos/drivers/network/tdi/cte/stubs.c Modified: trunk/reactos/drivers/network/tdi/tdi.rbuild Added: trunk/reactos/drivers/network/tdi/cte/events.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/cte/ev…
============================================================================== --- trunk/reactos/drivers/network/tdi/cte/events.c (added) +++ trunk/reactos/drivers/network/tdi/cte/events.c [iso-8859-1] Sat Jan 29 13:07:06 2011 @@ -1,0 +1,157 @@ +/* + * PROJECT: ReactOS TDI driver + * LICENSE: GPL - See COPYING in the top level directory + * FILE: drivers/network/tdi/cte/events.c + * PURPOSE: CTE events support + * PROGRAMMERS: Oleg Baikalow (obaikalow(a)gmail.com) + */ + +/* INCLUDES *****************************************************************/ + +#include <ntddk.h> + +typedef struct _CTEBLOCK_EVENT +{ + NTSTATUS Status; + KEVENT Event; +} CTEBLOCK_EVENT, *PCTEBLOCK_EVENT; + +struct _CTE_DELAYED_EVENT; +typedef void (*CTE_WORKER_ROUTINE)(struct _CTE_DELAYED_EVENT *, void *Context); + +typedef struct _CTE_DELAYED_EVENT +{ + BOOLEAN Queued; + KSPIN_LOCK Lock; + CTE_WORKER_ROUTINE WorkerRoutine; + PVOID Context; + WORK_QUEUE_ITEM WorkItem; +} CTE_DELAYED_EVENT, *PCTE_DELAYED_EVENT; + +/* FUNCTIONS *****************************************************************/ + +/* + * @implemented + */ +NTSTATUS +NTAPI +CTEBlock(PCTEBLOCK_EVENT Block) +{ + NTSTATUS Status; + + /* Perform the wait */ + Status = KeWaitForSingleObject(&Block->Event, UserRequest, KernelMode, FALSE, NULL); + + /* Update event status if wait was not successful */ + if (!NT_SUCCESS(Status)) Block->Status = Status; + + return Block->Status; +} + + +VOID +NTAPI +InternalWorker(IN PVOID Parameter) +{ + PCTE_DELAYED_EVENT Event = (PCTE_DELAYED_EVENT)Parameter; + KIRQL OldIrql; + + /* Acquire the lock */ + KeAcquireSpinLock(&Event->Lock, &OldIrql); + + /* Make sure it is queued */ + ASSERT(Event->Queued); + Event->Queued = FALSE; + + /* Release the lock */ + KeReleaseSpinLock(&Event->Lock, OldIrql); + + /* Call the real worker routine */ + (*Event->WorkerRoutine)(Event, Event->Context); +} + + +/* + * @implemented + */ +VOID +NTAPI +CTEInitEvent(PCTE_DELAYED_EVENT Event, + CTE_WORKER_ROUTINE Routine) +{ + /* Init the structure, lock and a work item */ + Event->Queued = FALSE; + KeInitializeSpinLock(&Event->Lock); + Event->WorkerRoutine = Routine; + ExInitializeWorkItem(&Event->WorkItem, InternalWorker, Event); +} + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +CTELogEvent ( + ULONG Unknown0, + ULONG Unknown1, + ULONG Unknown2, + ULONG Unknown3, + ULONG Unknown4, + ULONG Unknown5, + ULONG Unknown6 + ) +{ + /* Probably call + * IoAllocateErrorLogEntry and + * IoWriteErrorLogEntry + */ + return STATUS_NOT_IMPLEMENTED; +} + + +/* + * @implemented + */ +BOOLEAN +NTAPI +CTEScheduleEvent(PCTE_DELAYED_EVENT Event, + PVOID Context) +{ + KIRQL OldIrql; + + /* Acquire the lock */ + KeAcquireSpinLock(&Event->Lock, &OldIrql); + + /* Make sure it is queued */ + if (!Event->Queued); + { + /* Mark it as queued and set optional context pointer */ + Event->Queued = TRUE; + Event->Context = Context; + + /* Actually queue it */ + ExQueueWorkItem(&Event->WorkItem, CriticalWorkQueue); + } + + /* Release the lock */ + KeReleaseSpinLock(&Event->Lock, OldIrql); + + return TRUE; +} + + +/* + * @implemented + */ +LONG +NTAPI +CTESignal(PCTEBLOCK_EVENT Block, NTSTATUS Status) +{ + /* Set status right away */ + Block->Status = Status; + + /* Set the event */ + return KeSetEvent(&Block->Event, IO_NO_INCREMENT, FALSE); +} + +/* EOF */ Propchange: trunk/reactos/drivers/network/tdi/cte/events.c ------------------------------------------------------------------------------ svn:eol-style = native Removed: trunk/reactos/drivers/network/tdi/cte/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/cte/st…
============================================================================== --- trunk/reactos/drivers/network/tdi/cte/stubs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tdi/cte/stubs.c (removed) @@ -1,215 +1,0 @@ -/* - * PROJECT: ReactOS TDI driver - * LICENSE: GPL - See COPYING in the top level directory - * FILE: drivers/network/tdi/stubs.c - * PURPOSE: TDI misc support routines - * PROGRAMMERS: Oleg Baikalow (obaikalow(a)gmail.com) - */ - -/* INCLUDES *****************************************************************/ - -#include <ntddk.h> - - -typedef struct _CTEBLOCK_EVENT -{ - NTSTATUS Status; - KEVENT Event; -} CTEBLOCK_EVENT, *PCTEBLOCK_EVENT; - -struct _CTE_DELAYED_EVENT; -typedef void (*CTE_WORKER_ROUTINE)(struct _CTE_DELAYED_EVENT *, void *Context); - -typedef struct _CTE_DELAYED_EVENT -{ - BOOLEAN Queued; - KSPIN_LOCK Lock; - CTE_WORKER_ROUTINE WorkerRoutine; - PVOID Context; - WORK_QUEUE_ITEM WorkItem; -} CTE_DELAYED_EVENT, *PCTE_DELAYED_EVENT; - - -/* FUNCTIONS *****************************************************************/ - -/* - * @implemented - */ -NTSTATUS -NTAPI -CTEBlock(PCTEBLOCK_EVENT Block) -{ - NTSTATUS Status; - - /* Perform the wait */ - Status = KeWaitForSingleObject(&Block->Event, UserRequest, KernelMode, FALSE, NULL); - - /* Update event status if wait was not successful */ - if (!NT_SUCCESS(Status)) Block->Status = Status; - - return Block->Status; -} - - -VOID -NTAPI -InternalWorker(IN PVOID Parameter) -{ - PCTE_DELAYED_EVENT Event = (PCTE_DELAYED_EVENT)Parameter; - KIRQL OldIrql; - - /* Acquire the lock */ - KeAcquireSpinLock(&Event->Lock, &OldIrql); - - /* Make sure it is queued */ - ASSERT(Event->Queued); - Event->Queued = FALSE; - - /* Release the lock */ - KeReleaseSpinLock(&Event->Lock, OldIrql); - - /* Call the real worker routine */ - (*Event->WorkerRoutine)(Event, Event->Context); -} - - -/* - * @implemented - */ -VOID -NTAPI -CTEInitEvent(PCTE_DELAYED_EVENT Event, - CTE_WORKER_ROUTINE Routine) -{ - /* Init the structure, lock and a work item */ - Event->Queued = FALSE; - KeInitializeSpinLock(&Event->Lock); - Event->WorkerRoutine = Routine; - ExInitializeWorkItem(&Event->WorkItem, InternalWorker, Event); -} - - -/* - * @unimplemented - */ -VOID -NTAPI -CTEInitTimer ( - ULONG Unknown0 - ) -{ -} - - -/* - * @unimplemented - */ -BOOLEAN -NTAPI -CTEInitialize ( - VOID - ) -{ - /* FIXME: what should it initialize? */ - return TRUE; -} - - -/* - * @unimplemented - */ -NTSTATUS -NTAPI -CTELogEvent ( - ULONG Unknown0, - ULONG Unknown1, - ULONG Unknown2, - ULONG Unknown3, - ULONG Unknown4, - ULONG Unknown5, - ULONG Unknown6 - ) -{ - /* Probably call - * IoAllocateErrorLogEntry and - * IoWriteErrorLogEntry - */ - return STATUS_NOT_IMPLEMENTED; -} - - -/* - * @implemented - */ -BOOLEAN -NTAPI -CTEScheduleEvent(PCTE_DELAYED_EVENT Event, - PVOID Context) -{ - KIRQL OldIrql; - - /* Acquire the lock */ - KeAcquireSpinLock(&Event->Lock, &OldIrql); - - /* Make sure it is queued */ - if (!Event->Queued); - { - /* Mark it as queued and set optional context pointer */ - Event->Queued = TRUE; - Event->Context = Context; - - /* Actually queue it */ - ExQueueWorkItem(&Event->WorkItem, CriticalWorkQueue); - } - - /* Release the lock */ - KeReleaseSpinLock(&Event->Lock, OldIrql); - - return TRUE; -} - - -/* - * @implemented - */ -LONG -NTAPI -CTESignal(PCTEBLOCK_EVENT Block, NTSTATUS Status) -{ - /* Set status right away */ - Block->Status = Status; - - /* Set the event */ - return KeSetEvent(&Block->Event, IO_NO_INCREMENT, FALSE); -} - - -/* - * @unimplemented - */ -BOOLEAN -NTAPI -CTEStartTimer ( - ULONG Unknown0, - ULONG Unknown1, - ULONG Unknown2, - ULONG Unknown3 - ) -{ - return FALSE; -} - - -/* - * @unimplemented - */ -ULONG -NTAPI -CTESystemUpTime ( - VOID - ) -{ - return 0; -} - -/* EOF */ Added: trunk/reactos/drivers/network/tdi/cte/timer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/cte/ti…
============================================================================== --- trunk/reactos/drivers/network/tdi/cte/timer.c (added) +++ trunk/reactos/drivers/network/tdi/cte/timer.c [iso-8859-1] Sat Jan 29 13:07:06 2011 @@ -1,0 +1,66 @@ +/* + * PROJECT: ReactOS TDI driver + * LICENSE: GPL - See COPYING in the top level directory + * FILE: drivers/network/tdi/cte/timer.c + * PURPOSE: CTE timer support + * PROGRAMMERS: Oleg Baikalow (obaikalow(a)gmail.com) + */ + +/* INCLUDES *****************************************************************/ + +#include <ntddk.h> + +/* + * @unimplemented + */ +VOID +NTAPI +CTEInitTimer ( + ULONG Unknown0 + ) +{ +} + + +/* + * @unimplemented + */ +BOOLEAN +NTAPI +CTEInitialize ( + VOID + ) +{ + /* FIXME: what should it initialize? */ + return TRUE; +} + +/* + * @unimplemented + */ +BOOLEAN +NTAPI +CTEStartTimer ( + ULONG Unknown0, + ULONG Unknown1, + ULONG Unknown2, + ULONG Unknown3 + ) +{ + return FALSE; +} + + +/* + * @unimplemented + */ +ULONG +NTAPI +CTESystemUpTime ( + VOID + ) +{ + return 0; +} + +/* EOF */ Propchange: trunk/reactos/drivers/network/tdi/cte/timer.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/drivers/network/tdi/tdi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/tdi.rb…
============================================================================== --- trunk/reactos/drivers/network/tdi/tdi.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tdi/tdi.rbuild [iso-8859-1] Sat Jan 29 13:07:06 2011 @@ -6,8 +6,9 @@ <library>hal</library> <define name="_TDI_" /> <directory name="cte"> + <file>events.c</file> <file>string.c</file> - <file>stubs.c</file> + <file>timer.c</file> </directory> <directory name="misc"> <file>main.c</file>
13 years, 10 months
1
0
0
0
[fireball] 50550: [TDI] - Oleg Baikalow: Implement basic event and delayed event support functions for CTE. Structure names are made up, but their contents should be compatible with what Windows 20...
by fireball@svn.reactos.org
Author: fireball Date: Sat Jan 29 11:13:51 2011 New Revision: 50550 URL:
http://svn.reactos.org/svn/reactos?rev=50550&view=rev
Log: [TDI] - Oleg Baikalow: Implement basic event and delayed event support functions for CTE. Structure names are made up, but their contents should be compatible with what Windows 2003 tdi.sys uses. Formatting and coding style fixes by the committer. Modified: trunk/reactos/drivers/network/tdi/cte/stubs.c Modified: trunk/reactos/drivers/network/tdi/cte/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/cte/st…
============================================================================== --- trunk/reactos/drivers/network/tdi/cte/stubs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tdi/cte/stubs.c [iso-8859-1] Sat Jan 29 11:13:51 2011 @@ -1,32 +1,91 @@ -/* $Id$ - * - */ +/* + * PROJECT: ReactOS TDI driver + * LICENSE: GPL - See COPYING in the top level directory + * FILE: drivers/network/tdi/stubs.c + * PURPOSE: TDI misc support routines + * PROGRAMMERS: Oleg Baikalow (obaikalow(a)gmail.com) + */ + +/* INCLUDES *****************************************************************/ + #include <ntddk.h> -/* - * @unimplemented +typedef struct _CTEBLOCK_EVENT +{ + NTSTATUS Status; + KEVENT Event; +} CTEBLOCK_EVENT, *PCTEBLOCK_EVENT; + +struct _CTE_DELAYED_EVENT; +typedef void (*CTE_WORKER_ROUTINE)(struct _CTE_DELAYED_EVENT *, void *Context); + +typedef struct _CTE_DELAYED_EVENT +{ + BOOLEAN Queued; + KSPIN_LOCK Lock; + CTE_WORKER_ROUTINE WorkerRoutine; + PVOID Context; + WORK_QUEUE_ITEM WorkItem; +} CTE_DELAYED_EVENT, *PCTE_DELAYED_EVENT; + + +/* FUNCTIONS *****************************************************************/ + +/* + * @implemented */ NTSTATUS NTAPI -CTEBlock ( - ULONG Unknown0 - ) -{ - return STATUS_NOT_IMPLEMENTED; -} - - -/* - * @unimplemented - */ +CTEBlock(PCTEBLOCK_EVENT Block) +{ + NTSTATUS Status; + + /* Perform the wait */ + Status = KeWaitForSingleObject(&Block->Event, UserRequest, KernelMode, FALSE, NULL); + + /* Update event status if wait was not successful */ + if (!NT_SUCCESS(Status)) Block->Status = Status; + + return Block->Status; +} + + VOID NTAPI -CTEInitEvent ( - ULONG Unknown0, - ULONG Unknown1 - ) -{ +InternalWorker(IN PVOID Parameter) +{ + PCTE_DELAYED_EVENT Event = (PCTE_DELAYED_EVENT)Parameter; + KIRQL OldIrql; + + /* Acquire the lock */ + KeAcquireSpinLock(&Event->Lock, &OldIrql); + + /* Make sure it is queued */ + ASSERT(Event->Queued); + Event->Queued = FALSE; + + /* Release the lock */ + KeReleaseSpinLock(&Event->Lock, OldIrql); + + /* Call the real worker routine */ + (*Event->WorkerRoutine)(Event, Event->Context); +} + + +/* + * @implemented + */ +VOID +NTAPI +CTEInitEvent(PCTE_DELAYED_EVENT Event, + CTE_WORKER_ROUTINE Routine) +{ + /* Init the structure, lock and a work item */ + Event->Queued = FALSE; + KeInitializeSpinLock(&Event->Lock); + Event->WorkerRoutine = Routine; + ExInitializeWorkItem(&Event->WorkItem, InternalWorker, Event); } @@ -80,39 +139,48 @@ /* - * @unimplemented + * @implemented */ BOOLEAN NTAPI -CTEScheduleEvent ( - ULONG Unknown0, - ULONG Unknown1 - ) -{ - return FALSE; -} - - -/* - * @unimplemented +CTEScheduleEvent(PCTE_DELAYED_EVENT Event, + PVOID Context) +{ + KIRQL OldIrql; + + /* Acquire the lock */ + KeAcquireSpinLock(&Event->Lock, &OldIrql); + + /* Make sure it is queued */ + if (!Event->Queued); + { + /* Mark it as queued and set optional context pointer */ + Event->Queued = TRUE; + Event->Context = Context; + + /* Actually queue it */ + ExQueueWorkItem(&Event->WorkItem, CriticalWorkQueue); + } + + /* Release the lock */ + KeReleaseSpinLock(&Event->Lock, OldIrql); + + return TRUE; +} + + +/* + * @implemented */ LONG NTAPI -CTESignal ( - ULONG Unknown0, - ULONG Unknown1 - ) -{ -#if 0 - PKEVENT kevent = (PKEVENT) Unknown0; - - return KeSetEvent ( - kevent, - 0, - FALSE - ); -#endif - return 0; +CTESignal(PCTEBLOCK_EVENT Block, NTSTATUS Status) +{ + /* Set status right away */ + Block->Status = Status; + + /* Set the event */ + return KeSetEvent(&Block->Event, IO_NO_INCREMENT, FALSE); }
13 years, 10 months
1
0
0
0
[tkreuzer] 50549: [CMAKE] Ignore MSVC standard includes
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jan 29 10:29:42 2011 New Revision: 50549 URL:
http://svn.reactos.org/svn/reactos?rev=50549&view=rev
Log: [CMAKE] Ignore MSVC standard includes Modified: branches/cmake-bringup/msc.cmake Modified: branches/cmake-bringup/msc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=505…
============================================================================== --- branches/cmake-bringup/msc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/msc.cmake [iso-8859-1] Sat Jan 29 10:29:42 2011 @@ -13,7 +13,7 @@ endif() endif() -add_definitions(/GS- /Zl /Zi) +add_definitions(/X /GS- /Zl /Zi) add_definitions(-Dinline=__inline -D__STDC__=1) if(${_MACHINE_ARCH_FLAG} MATCHES X86)
13 years, 10 months
1
0
0
0
[jimtabor] 50548: [Win32k] - Fix crash with standalone win test_hind_message test.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Jan 29 09:09:10 2011 New Revision: 50548 URL:
http://svn.reactos.org/svn/reactos?rev=50548&view=rev
Log: [Win32k] - Fix crash with standalone win test_hind_message test. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] Sat Jan 29 09:09:10 2011 @@ -692,13 +692,18 @@ { PDESKTOP Desktop; PTHRDCARETINFO CaretInfo; + PTHREADINFO pti; + PUSER_MESSAGE_QUEUE ActiveMessageQueue; HWND hWndCaret; PWND WndCaret; ASSERT_REFS_CO(Window); - Desktop = ((PTHREADINFO)PsGetCurrentThread()->Tcb.Win32Thread)->rpdesk; - CaretInfo = ((PUSER_MESSAGE_QUEUE)Desktop->ActiveMessageQueue)->CaretInfo; + pti = PsGetCurrentThreadWin32Thread(); + Desktop = pti->rpdesk; + ActiveMessageQueue = Desktop->ActiveMessageQueue; + if (!ActiveMessageQueue) return 0; + CaretInfo = ActiveMessageQueue->CaretInfo; hWndCaret = CaretInfo->hWnd; WndCaret = UserGetWindowObject(hWndCaret);
13 years, 10 months
1
0
0
0
[jimtabor] 50547: [Win32k] - Patch by rafalh <rafalh1992 at o2 dor pl>, see bug 5835. Fix timers implementation.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Jan 29 09:03:25 2011 New Revision: 50547 URL:
http://svn.reactos.org/svn/reactos?rev=50547&view=rev
Log: [Win32k] - Patch by rafalh <rafalh1992 at o2 dor pl>, see bug 5835. Fix timers implementation. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/timer.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/timer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] Sat Jan 29 09:03:25 2011 @@ -19,7 +19,7 @@ /* GLOBALS *******************************************************************/ -static PTIMER FirstpTmr = NULL; +static LIST_ENTRY TimersListHead; static LONG TimeLast = 0; #define MAX_ELAPSE_TIME 0x7FFFFFFF @@ -62,26 +62,13 @@ HANDLE Handle; PTIMER Ret = NULL; - if (!FirstpTmr) - { - ExInitializeResourceLite(&TimerLock); - FirstpTmr = UserCreateObject(gHandleTable, NULL, &Handle, otTimer, sizeof(TIMER)); - if (FirstpTmr) - { - FirstpTmr->head.h = Handle; - InitializeListHead(&FirstpTmr->ptmrList); - } - Ret = FirstpTmr; - } - else - { - Ret = UserCreateObject(gHandleTable, NULL, &Handle, otTimer, sizeof(TIMER)); - if (Ret) - { - Ret->head.h = Handle; - InsertTailList(&FirstpTmr->ptmrList, &Ret->ptmrList); - } - } + Ret = UserCreateObject(gHandleTable, NULL, &Handle, otTimer, sizeof(TIMER)); + if (Ret) + { + Ret->head.h = Handle; + InsertTailList(&TimersListHead, &Ret->ptmrList); + } + return Ret; } @@ -118,12 +105,13 @@ UINT_PTR nID, UINT flags) { - PLIST_ENTRY pLE; - PTIMER pTmr = FirstpTmr, RetTmr = NULL; + PLIST_ENTRY pLE = TimersListHead.Flink; + PTIMER pTmr, RetTmr = NULL; + TimerEnterExclusive(); - do - { - if (!pTmr) break; + while (pLE != &TimersListHead) + { + pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); if ( pTmr->nID == nID && pTmr->pWnd == Window && @@ -133,32 +121,31 @@ break; } - pLE = pTmr->ptmrList.Flink; + pLE = pLE->Flink; + } + TimerLeave(); + + return RetTmr; +} + +PTIMER +FASTCALL +FindSystemTimer(PMSG pMsg) +{ + PLIST_ENTRY pLE = TimersListHead.Flink; + PTIMER pTmr = NULL; + + TimerEnterExclusive(); + while (pLE != &TimersListHead) + { pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); - } while (pTmr != FirstpTmr); - TimerLeave(); - - return RetTmr; -} - -PTIMER -FASTCALL -FindSystemTimer(PMSG pMsg) -{ - PLIST_ENTRY pLE; - PTIMER pTmr = FirstpTmr; - TimerEnterExclusive(); - do - { - if (!pTmr) break; if ( pMsg->lParam == (LPARAM)pTmr->pfn && (pTmr->flags & TMRF_SYSTEM) ) break; - pLE = pTmr->ptmrList.Flink; - pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); - } while (pTmr != FirstpTmr); + pLE = pLE->Flink; + } TimerLeave(); return pTmr; @@ -169,15 +156,14 @@ ValidateTimerCallback(PTHREADINFO pti, LPARAM lParam) { - PLIST_ENTRY pLE; + PLIST_ENTRY pLE = TimersListHead.Flink; BOOL Ret = FALSE; - PTIMER pTmr = FirstpTmr; - - if (!pTmr) return FALSE; + PTIMER pTmr; TimerEnterExclusive(); - do - { + while (pLE != &TimersListHead) + { + pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); if ( (lParam == (LPARAM)pTmr->pfn) && !(pTmr->flags & (TMRF_SYSTEM|TMRF_RIT)) && (pTmr->pti->ppi == pti->ppi) ) @@ -185,9 +171,8 @@ Ret = TRUE; break; } - pLE = pTmr->ptmrList.Flink; - pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); - } while (pTmr != FirstpTmr); + pLE = pLE->Flink; + } TimerLeave(); return Ret; @@ -286,7 +271,7 @@ ASSERT(MasterTimer != NULL); // Start the timer thread! - if (pTmr == FirstpTmr) + if (TimersListHead.Flink == TimersListHead.Blink) // There is only one timer KeSetTimer(MasterTimer, DueTime, NULL); return Ret; @@ -334,22 +319,21 @@ FASTCALL PostTimerMessages(PWND Window) { - PLIST_ENTRY pLE; + PLIST_ENTRY pLE = TimersListHead.Flink; PUSER_MESSAGE_QUEUE ThreadQueue; MSG Msg; PTHREADINFO pti; BOOL Hit = FALSE; - PTIMER pTmr = FirstpTmr; - - if (!pTmr) return FALSE; + PTIMER pTmr; pti = PsGetCurrentThreadWin32Thread(); ThreadQueue = pti->MessageQueue; TimerEnterExclusive(); - do - { + while(pLE != &TimersListHead) + { + pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); if ( (pTmr->flags & TMRF_READY) && (pTmr->pti == pti) && ((pTmr->pWnd == Window) || (Window == NULL)) ) @@ -366,9 +350,8 @@ break; } - pLE = pTmr->ptmrList.Flink; - pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); - } while (pTmr != FirstpTmr); + pLE = pLE->Flink; + } TimerLeave(); @@ -381,11 +364,9 @@ { LARGE_INTEGER TickCount, DueTime; LONG Time; - PLIST_ENTRY pLE; - PTIMER pTmr = FirstpTmr; + PLIST_ENTRY pLE = TimersListHead.Flink; + PTIMER pTmr; LONG TimerCount = 0; - - if (!pTmr) return; TimerEnterExclusive(); @@ -394,8 +375,9 @@ DueTime.QuadPart = (LONGLONG)(-500000); - do - { + while(pLE != &TimersListHead) + { + pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); TimerCount++; if (pTmr->flags & TMRF_WAITING) { @@ -440,9 +422,8 @@ pTmr->cmsCountdown -= Time - TimeLast; } - pLE = pTmr->ptmrList.Flink; - pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); - } while (pTmr != FirstpTmr); + pLE = pLE->Flink; + } // Restart the timer thread! ASSERT(MasterTimer != NULL); @@ -457,24 +438,24 @@ BOOL FASTCALL DestroyTimersForWindow(PTHREADINFO pti, PWND Window) { - PLIST_ENTRY pLE; - PTIMER pTmr = FirstpTmr; + PLIST_ENTRY pLE = TimersListHead.Flink; + PTIMER pTmr; BOOL TimersRemoved = FALSE; - if ((FirstpTmr == NULL) || (Window == NULL)) + if ((Window == NULL)) return FALSE; TimerEnterExclusive(); - do + while(pLE != &TimersListHead) { + pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); + pLE = pLE->Flink; /* get next timer list entry before current timer is removed */ if ((pTmr) && (pTmr->pti == pti) && (pTmr->pWnd == Window)) { TimersRemoved = RemoveTimer(pTmr); } - pLE = pTmr->ptmrList.Flink; - pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); - } while (pTmr != FirstpTmr); + } TimerLeave(); @@ -484,24 +465,21 @@ BOOL FASTCALL DestroyTimersForThread(PTHREADINFO pti) { - PLIST_ENTRY pLE; - PTIMER pTmr = FirstpTmr; + PLIST_ENTRY pLE = TimersListHead.Flink; + PTIMER pTmr; BOOL TimersRemoved = FALSE; - if (FirstpTmr == NULL) - return FALSE; - TimerEnterExclusive(); - do + while(pLE != &TimersListHead) { + pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); + pLE = pLE->Flink; /* get next timer list entry before current timer is removed */ if ((pTmr) && (pTmr->pti == pti)) { TimersRemoved = RemoveTimer(pTmr); } - pLE = pTmr->ptmrList.Flink; - pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList); - } while (pTmr != FirstpTmr); + } TimerLeave(); @@ -549,6 +527,9 @@ /* yes we need this, since ExAllocatePoolWithTag isn't supposed to zero out allocated memory */ RtlClearAllBits(&WindowLessTimersBitMap); + + ExInitializeResourceLite(&TimerLock); + InitializeListHead(&TimersListHead); return STATUS_SUCCESS; }
13 years, 10 months
1
0
0
0
[fireball] 50546: - Oleg Baikalow: TDI exported function prototypes are documented in WDK 7, so use them in our driver instead of old, probably NT4-aged stubs full of unknown variables. - Oleg Baik...
by fireball@svn.reactos.org
Author: fireball Date: Fri Jan 28 22:13:44 2011 New Revision: 50546 URL:
http://svn.reactos.org/svn/reactos?rev=50546&view=rev
Log: - Oleg Baikalow: TDI exported function prototypes are documented in WDK 7, so use them in our driver instead of old, probably NT4-aged stubs full of unknown variables. - Oleg Baikalow: Don't use psdk's tdi.h but use a real tdikrnl.h (adding a _TDI_ global define so it's recognized as a tdi driver itself). Modified: trunk/reactos/drivers/network/tdi/misc/tdi.spec trunk/reactos/drivers/network/tdi/tdi.rbuild trunk/reactos/drivers/network/tdi/tdi/dereg.c trunk/reactos/drivers/network/tdi/tdi/stubs.c Modified: trunk/reactos/drivers/network/tdi/misc/tdi.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/misc/t…
============================================================================== --- trunk/reactos/drivers/network/tdi/misc/tdi.spec [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tdi/misc/tdi.spec [iso-8859-1] Fri Jan 28 22:13:44 2011 @@ -27,13 +27,13 @@ @ stdcall TdiDeregisterDeviceObject(ptr) @ stdcall TdiDeregisterNetAddress(ptr) @ stdcall TdiDeregisterNotificationHandler(ptr) - @ stdcall TdiInitialize(ptr) + @ stdcall TdiInitialize() @ stdcall TdiMapBuffer(ptr) @ stdcall TdiMapUserRequest(ptr ptr ptr) @ stdcall TdiOpenNetbiosAddress(long long long long) @ stdcall TdiRegisterAddressChangeHandler(long long long) @ stdcall TdiRegisterDeviceObject(long long) - @ stdcall TdiRegisterNetAddress(long long) + @ stdcall TdiRegisterNetAddress(long ptr ptr ptr) @ stdcall TdiRegisterNotificationHandler(long long long) @ stdcall TdiReturnChainedReceives(ptr long) @ stdcall TdiUnmapBuffer(ptr) Modified: trunk/reactos/drivers/network/tdi/tdi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/tdi.rb…
============================================================================== --- trunk/reactos/drivers/network/tdi/tdi.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tdi/tdi.rbuild [iso-8859-1] Fri Jan 28 22:13:44 2011 @@ -4,6 +4,7 @@ <importlibrary definition="misc/tdi.spec"></importlibrary> <library>ntoskrnl</library> <library>hal</library> + <define name="_TDI_" /> <directory name="cte"> <file>string.c</file> <file>stubs.c</file> Modified: trunk/reactos/drivers/network/tdi/tdi/dereg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/tdi/de…
============================================================================== --- trunk/reactos/drivers/network/tdi/tdi/dereg.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tdi/tdi/dereg.c [iso-8859-1] Fri Jan 28 22:13:44 2011 @@ -1,8 +1,5 @@ -/* $Id$ - * - */ #include <ntddk.h> -#include <tdi.h> +#include <tdikrnl.h> /* De-/Register Action IDs for TdiDeRegister */ @@ -21,18 +18,6 @@ } TDI_OBJECT_ACTION; -static -NTSTATUS -NTAPI -TdiDeRegister ( - IN TDI_OBJECT_ACTION Action, - IN OUT PVOID Object - ) -{ - return STATUS_NOT_IMPLEMENTED; -} - - /* ADDRESS_CHANGE_HANDLER */ /* @@ -40,20 +25,11 @@ */ NTSTATUS NTAPI -TdiRegisterAddressChangeHandler ( - ULONG Unknown0, - ULONG Unknown1, - ULONG Unknown2 - ) +TdiRegisterAddressChangeHandler(IN TDI_ADD_ADDRESS_HANDLER AddHandler, + IN TDI_DEL_ADDRESS_HANDLER DeleteHandler, + OUT HANDLE *BindingHandle) { -#if 0 - NTSTATUS Status = STATUS_SUCCESS; - Status = TdiDeRegister ( - R_ADDRESS_CHANGE_HANDLER, - AddressChangeHandler - ); -#endif - return STATUS_NOT_IMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } @@ -62,14 +38,9 @@ */ NTSTATUS NTAPI -TdiDeregisterAddressChangeHandler ( - IN PVOID AddressChangeHandler - ) +TdiDeregisterAddressChangeHandler(IN HANDLE BindingHandle) { - return TdiDeRegister ( - D_ADDRESS_CHANGE_HANDLER, - AddressChangeHandler - ); + return STATUS_NOT_IMPLEMENTED; } @@ -80,19 +51,10 @@ */ NTSTATUS NTAPI -TdiRegisterDeviceObject ( - ULONG Unknown0, - ULONG Unknown1 - ) +TdiRegisterDeviceObject(IN PUNICODE_STRING DeviceName, + OUT HANDLE *RegistrationHandle) { -#if 0 - NTSTATUS Status = STATUS_SUCCESS; - Status = TdiDeRegister ( - R_DEVICE_OBJECT, - DeviceObject - ); -#endif - return STATUS_NOT_IMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } @@ -101,14 +63,9 @@ */ NTSTATUS NTAPI -TdiDeregisterDeviceObject ( - IN PVOID DeviceObject - ) +TdiDeregisterDeviceObject(IN HANDLE RegistrationHandle) { - return TdiDeRegister ( - D_DEVICE_OBJECT, - DeviceObject - ); + return STATUS_NOT_IMPLEMENTED; } @@ -119,19 +76,12 @@ */ NTSTATUS NTAPI -TdiRegisterNetAddress ( - ULONG Unknown0, - ULONG Unknown1 - ) +TdiRegisterNetAddress(IN PTA_ADDRESS Address, + IN PUNICODE_STRING DeviceName, + IN PTDI_PNP_CONTEXT Context, + OUT HANDLE *RegistrationHandle) { -#if 0 - NTSTATUS Status = STATUS_SUCCESS; - Status = TdiDeRegister ( - R_NET_ADDRESS, - NetAddress - ); -#endif - return STATUS_NOT_IMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } @@ -140,14 +90,9 @@ */ NTSTATUS NTAPI -TdiDeregisterNetAddress ( - IN PVOID NetAddress - ) +TdiDeregisterNetAddress(IN HANDLE RegistrationHandle) { - return TdiDeRegister ( - D_NET_ADDRESS, - NetAddress - ); + return STATUS_NOT_IMPLEMENTED; } @@ -158,20 +103,11 @@ */ NTSTATUS NTAPI -TdiRegisterNotificationHandler ( - ULONG Unknown0, - ULONG Unknown1, - ULONG Unknown2 - ) +TdiRegisterNotificationHandler(IN TDI_BIND_HANDLER BindHandler, + IN TDI_UNBIND_HANDLER UnbindHandler, + OUT HANDLE *BindingHandle) { -#if 0 - NTSTATUS Status = STATUS_SUCCESS; - Status = TdiDeRegister ( - R_NOTIFICATION_HANDLER, - NotificationHandler - ); -#endif - return STATUS_NOT_IMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } @@ -180,15 +116,9 @@ */ NTSTATUS NTAPI -TdiDeregisterNotificationHandler ( - IN PVOID NotificationHandler - ) +TdiDeregisterNotificationHandler(IN HANDLE BindingHandle) { - return TdiDeRegister ( - DT_NOTIFICATION_HANDLER, - NotificationHandler - ); + return STATUS_NOT_IMPLEMENTED; } - /* EOF */ Modified: trunk/reactos/drivers/network/tdi/tdi/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/tdi/st…
============================================================================== --- trunk/reactos/drivers/network/tdi/tdi/stubs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tdi/tdi/stubs.c [iso-8859-1] Fri Jan 28 22:13:44 2011 @@ -75,9 +75,7 @@ */ VOID NTAPI -TdiInitialize ( - PVOID Unknown0 - ) +TdiInitialize () { }
13 years, 10 months
1
0
0
0
[tkreuzer] 50545: [IP] Convert checksum.S to new ML compatible syntax. Resulting obj was compared and is identical to trunk (both GAS and ML)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Jan 28 20:35:22 2011 New Revision: 50545 URL:
http://svn.reactos.org/svn/reactos?rev=50545&view=rev
Log: [IP] Convert checksum.S to new ML compatible syntax. Resulting obj was compared and is identical to trunk (both GAS and ML) Modified: branches/cmake-bringup/lib/drivers/ip/network/i386/checksum.S Modified: branches/cmake-bringup/lib/drivers/ip/network/i386/checksum.S URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/drivers/ip/ne…
============================================================================== --- branches/cmake-bringup/lib/drivers/ip/network/i386/checksum.S [iso-8859-1] (original) +++ branches/cmake-bringup/lib/drivers/ip/network/i386/checksum.S [iso-8859-1] Fri Jan 28 20:35:22 2011 @@ -24,109 +24,111 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ - + /* * computes a partial checksum, e.g. for TCP/UDP fragments */ -/* +/* unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) */ - -.text + +#include <asm.inc> + +.code .align 4 -.globl _csum_partial - +PUBLIC _csum_partial + #ifndef CONFIG_X86_USE_PPRO_CHECKSUM - /* + /* * Experiments with Ethernet and SLIP connections show that buff * is aligned on either a 2-byte or 4-byte boundary. We get at * least a twofold speedup on 486 and Pentium if it is 4-byte aligned. * Fortunately, it is easy to convert 2-byte alignment to 4-byte * alignment for the unrolled loop. - */ -_csum_partial: - pushl %esi - pushl %ebx - movl 20(%esp),%eax # Function arg: unsigned int sum - movl 16(%esp),%ecx # Function arg: int len - movl 12(%esp),%esi # Function arg: unsigned char *buff - testl $3, %esi # Check alignment. - jz 2f # Jump if alignment is ok. - testl $1, %esi # Check alignment. - jz 10f # Jump if alignment is boundary of 2bytes. + */ +_csum_partial: + push esi + push ebx + mov eax, [esp + 20] // Function arg: unsigned int sum + mov ecx, [esp + 16] // Function arg: int len + mov esi, [esp + 12] // Function arg: unsigned char *buff + test esi, 3 // Check alignment. + jz m2 // Jump if alignment is ok. + test esi, 1 // Check alignment. + jz l10 // Jump if alignment is boundary of 2bytes. // buf is odd - dec %ecx - jl 8f - movzbl (%esi), %ebx - adcl %ebx, %eax - roll $8, %eax - inc %esi - testl $2, %esi - jz 2f -10: - subl $2, %ecx # Alignment uses up two bytes. - jae 1f # Jump if we had at least two bytes. - addl $2, %ecx # ecx was < 2. Deal with it. - jmp 4f -1: movw (%esi), %bx - addl $2, %esi - addw %bx, %ax - adcl $0, %eax -2: - movl %ecx, %edx - shrl $5, %ecx - jz 2f - testl %esi, %esi -1: movl (%esi), %ebx - adcl %ebx, %eax - movl 4(%esi), %ebx - adcl %ebx, %eax - movl 8(%esi), %ebx - adcl %ebx, %eax - movl 12(%esi), %ebx - adcl %ebx, %eax - movl 16(%esi), %ebx - adcl %ebx, %eax - movl 20(%esi), %ebx - adcl %ebx, %eax - movl 24(%esi), %ebx - adcl %ebx, %eax - movl 28(%esi), %ebx - adcl %ebx, %eax - lea 32(%esi), %esi - dec %ecx - jne 1b - adcl $0, %eax -2: movl %edx, %ecx - andl $0x1c, %edx - je 4f - shrl $2, %edx # This clears CF -3: adcl (%esi), %eax - lea 4(%esi), %esi - dec %edx - jne 3b - adcl $0, %eax -4: andl $3, %ecx - jz 7f - cmpl $2, %ecx - jb 5f - movw (%esi),%cx - leal 2(%esi),%esi - je 6f - shll $16,%ecx -5: movb (%esi),%cl -6: addl %ecx,%eax - adcl $0, %eax -7: - testl $1, 12(%esp) - jz 8f - roll $8, %eax -8: - popl %ebx - popl %esi + dec ecx + jl l8 + movzx ebx, byte ptr [esi] + adc eax, ebx + rol eax, 8 + inc esi + test esi, 2 + jz m2 +l10: + sub ecx, 2 // Alignment uses up two bytes. + jae m1 // Jump if we had at least two bytes. + add ecx, 2 // ecx was < 2. Deal with it. + jmp l4 +m1: mov bx, [esi] + add esi, 2 + add ax, bx + adc eax, 0 +m2: + mov edx, ecx + shr ecx, 5 + jz l2 + test esi, esi +l1: mov ebx, [esi] + adc eax, ebx + mov ebx, [esi + 4] + adc eax, ebx + mov ebx, [esi + 8] + adc eax, ebx + mov ebx, [esi + 12] + adc eax, ebx + mov ebx, [esi + 16] + adc eax, ebx + mov ebx, [esi + 20] + adc eax, ebx + mov ebx, [esi + 24] + adc eax, ebx + mov ebx, [esi + 28] + adc eax, ebx + lea esi, [esi + 32] + dec ecx + jne l1 + adc eax, 0 +l2: mov ecx, edx + and edx, HEX(1c) + je l4 + shr edx, 2 // This clears CF +l3: adc eax, [esi] + lea esi, [esi + 4] + dec edx + jne l3 + adc eax, 0 +l4: and ecx, 3 + jz l7 + cmp ecx, 2 + jb l5 + mov cx, [esi] + lea esi, [esi + 2] + je l6 + shl ecx, 16 +l5: mov cl, [esi] +l6: add eax, ecx + adc eax, 0 +l7: + test dword ptr [esp + 12], 1 + jz l8 + rol eax, 8 +l8: + pop ebx + pop esi ret #else @@ -134,116 +136,118 @@ /* Version for PentiumII/PPro */ csum_partial: - pushl %esi - pushl %ebx - movl 20(%esp),%eax # Function arg: unsigned int sum - movl 16(%esp),%ecx # Function arg: int len - movl 12(%esp),%esi # Function arg: const unsigned char *buf - - testl $3, %esi - jnz 25f -10: - movl %ecx, %edx - movl %ecx, %ebx - andl $0x7c, %ebx - shrl $7, %ecx - addl %ebx,%esi - shrl $2, %ebx - negl %ebx - lea 45f(%ebx,%ebx,2), %ebx - testl %esi, %esi - jmp *%ebx - - # Handle 2-byte-aligned regions -20: addw (%esi), %ax - lea 2(%esi), %esi - adcl $0, %eax - jmp 10b -25: - testl $1, %esi - jz 30f - # buf is odd - dec %ecx - jl 90f - movzbl (%esi), %ebx - addl %ebx, %eax - adcl $0, %eax - roll $8, %eax - inc %esi - testl $2, %esi - jz 10b - -30: subl $2, %ecx - ja 20b - je 32f - addl $2, %ecx - jz 80f - movzbl (%esi),%ebx # csumming 1 byte, 2-aligned - addl %ebx, %eax - adcl $0, %eax - jmp 80f -32: - addw (%esi), %ax # csumming 2 bytes, 2-aligned - adcl $0, %eax - jmp 80f - -40: - addl -128(%esi), %eax - adcl -124(%esi), %eax - adcl -120(%esi), %eax - adcl -116(%esi), %eax - adcl -112(%esi), %eax - adcl -108(%esi), %eax - adcl -104(%esi), %eax - adcl -100(%esi), %eax - adcl -96(%esi), %eax - adcl -92(%esi), %eax - adcl -88(%esi), %eax - adcl -84(%esi), %eax - adcl -80(%esi), %eax - adcl -76(%esi), %eax - adcl -72(%esi), %eax - adcl -68(%esi), %eax - adcl -64(%esi), %eax - adcl -60(%esi), %eax - adcl -56(%esi), %eax - adcl -52(%esi), %eax - adcl -48(%esi), %eax - adcl -44(%esi), %eax - adcl -40(%esi), %eax - adcl -36(%esi), %eax - adcl -32(%esi), %eax - adcl -28(%esi), %eax - adcl -24(%esi), %eax - adcl -20(%esi), %eax - adcl -16(%esi), %eax - adcl -12(%esi), %eax - adcl -8(%esi), %eax - adcl -4(%esi), %eax -45: - lea 128(%esi), %esi - adcl $0, %eax - dec %ecx - jge 40b - movl %edx, %ecx -50: andl $3, %ecx - jz 80f - - # Handle the last 1-3 bytes without jumping - notl %ecx # 1->2, 2->1, 3->0, higher bits are masked - movl $0xffffff,%ebx # by the shll and shrl instructions - shll $3,%ecx - shrl %cl,%ebx - andl -128(%esi),%ebx # esi is 4-aligned so should be ok - addl %ebx,%eax - adcl $0,%eax -80: - testl $1, 12(%esp) - jz 90f - roll $8, %eax -90: - popl %ebx - popl %esi + push esi + push ebx + mov eax, [esp + 20] # Function arg: unsigned int sum + mov ecx, [esp + 16] # Function arg: int len + mov esi, [esp + 12] # Function arg: const unsigned char *buf + + test esi, 3 + jnz l25f +l10: + mov edx, ecx + mov ebx, ecx + and ebx, HEX(7c) + shr ecx, 7 + add esi, ebx + shr ebx, 2 + neg ebx + lea ebx, l45[ebx + ebx * 2] + test esi, esi + jmp dword ptr [ebx] + + // Handle 2-byte-aligned regions +l20: add ax, [esi] + lea esi, [esi + 2] + adc eax, 0 + jmp l10b +l25: + test esi, 1 + jz l30f + // buf is odd + dec ecx + jl l90 + movzb ebx, [esi] + add eax, ebx + adc eax, 0 + rol eax, 8 + inc esi + test esi, 2 + jz l10b + +l30: sub ecx, 2 + ja l20 + je l32 + add ecx, 2 + jz l80 + movzb ebx, [esi] // csumming 1 byte, 2-aligned + add eax, ebx + adc eax, 0 + jmp l80 +l32: + add ax, [esi] // csumming 2 bytes, 2-aligned + adc eax, 0 + jmp l80 + +l40: + add eax, [esi -128] + adc eax, [esi -124] + adc eax, [esi -120] + adc eax, [esi -116] + adc eax, [esi -112] + adc eax, [esi -108] + adc eax, [esi -104] + adc eax, [esi -100] + adc eax, [esi -96] + adc eax, [esi -92] + adc eax, [esi -88] + adc eax, [esi -84] + adc eax, [esi -80] + adc eax, [esi -76] + adc eax, [esi -72] + adc eax, [esi -68] + adc eax, [esi -64] + adc eax, [esi -60] + adc eax, [esi -56] + adc eax, [esi -52] + adc eax, [esi -48] + adc eax, [esi -44] + adc eax, [esi -40] + adc eax, [esi -36] + adc eax, [esi -32] + adc eax, [esi -28] + adc eax, [esi -24] + adc eax, [esi -20] + adc eax, [esi -16] + adc eax, [esi -12] + adc eax, [esi -8] + adc eax, [esi -4] +l45: + lea esi, [esi + 128] + adc eax, 0 + dec ecx + jge l40 + mov ecx, edx +l50: and ecx, 3 + jz l80 + + // Handle the last 1-3 bytes without jumping + not ecx // 1->2, 2->1, 3->0, higher bits are masked + mov ebx, HEX(ffffff) // by the shll and shrl instructions + shl ecx, 3 + shr ebx, cl + and ebx, [esi -128] // esi is 4-aligned so should be ok + add eax, ebx + adc eax, 0 +l80: + test dword ptr [esp + 12], 1 + jz l90 + rol eax, 8 +l90: + pop ebx + pop esi ret - + #endif + +END
13 years, 10 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
34
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
Results per page:
10
25
50
100
200