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
[cgutman] 35785: - FCB->State gets set to SOCKET_STATE_CONNECTED in MakeSocketIntoConnection
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Aug 29 21:40:26 2008 New Revision: 35785 URL:
http://svn.reactos.org/svn/reactos?rev=35785&view=rev
Log: - FCB->State gets set to SOCKET_STATE_CONNECTED in MakeSocketIntoConnection Modified: branches/aicom-network-fixes/drivers/network/afd/afd/listen.c Modified: branches/aicom-network-fixes/drivers/network/afd/afd/listen.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] Fri Aug 29 21:40:26 2008 @@ -27,7 +27,6 @@ /* Transfer the connection to the new socket, launch the opening read */ AFD_DbgPrint(MID_TRACE,("Completing a real accept (FCB %x)\n", FCB)); - FCB->State = SOCKET_STATE_CONNECTED; FCB->Connection = Qelt->Object; if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress );
16 years, 3 months
1
0
0
0
[cgutman] 35784: - Check if MakeSocketIntoConnection succeeded - Check if TaCopyTransportAddress succeeded
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Aug 29 21:30:27 2008 New Revision: 35784 URL:
http://svn.reactos.org/svn/reactos?rev=35784&view=rev
Log: - Check if MakeSocketIntoConnection succeeded - Check if TaCopyTransportAddress succeeded Modified: branches/aicom-network-fixes/drivers/network/afd/afd/listen.c Modified: branches/aicom-network-fixes/drivers/network/afd/afd/listen.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] Fri Aug 29 21:30:27 2008 @@ -17,6 +17,7 @@ PFILE_OBJECT NewFileObject, PAFD_TDI_OBJECT_QELT Qelt ) { PAFD_FCB FCB = NewFileObject->FsContext; + NTSTATUS Status; if( !SocketAcquireStateLock( FCB ) ) { LostSocket( Irp ); @@ -33,15 +34,21 @@ FCB->RemoteAddress = TaCopyTransportAddress( Qelt->ConnInfo->RemoteAddress ); + if( !FCB->RemoteAddress ) + Status = STATUS_NO_MEMORY; + else + Status = MakeSocketIntoConnection( FCB ); + + if( NT_SUCCESS(Status) ) { + FCB->PollState |= AFD_EVENT_SEND; + PollReeval( DeviceExt, NewFileObject ); + } + if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); - + Irp->IoStatus.Information = 0; - Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Status = Status; IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); - - MakeSocketIntoConnection( FCB ); - FCB->PollState |= AFD_EVENT_SEND; - PollReeval( DeviceExt, NewFileObject ); SocketStateUnlock( FCB ); }
16 years, 3 months
1
0
0
0
[cgutman] 35783: - Check that we successfully allocated memory - Return TDI_NO_RESOURCES instead of STATUS_NO_MEMORY
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Aug 29 21:04:30 2008 New Revision: 35783 URL:
http://svn.reactos.org/svn/reactos?rev=35783&view=rev
Log: - Check that we successfully allocated memory - Return TDI_NO_RESOURCES instead of STATUS_NO_MEMORY Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/ninfo.c Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/ninfo.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/ninfo.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/ninfo.c [iso-8859-1] Fri Aug 29 21:04:30 2008 @@ -26,6 +26,9 @@ IF_LIST_ITER(CurrentIF); TI_DbgPrint(DEBUG_INFO, ("Called.\n")); + + if (!IpAddress) + return TDI_NO_RESOURCES; TcpipAcquireSpinLock(&InterfaceListLock, &OldIrql); @@ -80,7 +83,7 @@ if( !RCache || !RouteEntries ) { if( RCache ) ExFreePool( RCache ); if( RouteEntries ) ExFreePool( RouteEntries ); - return STATUS_NO_MEMORY; + return TDI_NO_RESOURCES; } RtlZeroMemory( RouteEntries, Size );
16 years, 3 months
1
0
0
0
[tkreuzer] 35782: - implement spinlocks, based on x86 up hal code - comment out KeInitializeSpinLock on amd64 builds (it's inlined there) - define some fastcall functions to normal on amd64 - Update amd64 stubs - remove wrong exports from ntokrnl
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 29 20:44:37 2008 New Revision: 35782 URL:
http://svn.reactos.org/svn/reactos?rev=35782&view=rev
Log: - implement spinlocks, based on x86 up hal code - comment out KeInitializeSpinLock on amd64 builds (it's inlined there) - define some fastcall functions to normal on amd64 - Update amd64 stubs - remove wrong exports from ntokrnl Added: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/spinlock.c (with props) Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/amd64stubs.c branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/ke/spinlock.c branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-amd64hack.rbuild branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl_amd64.def Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/amd64stubs.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/amd64stubs.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/amd64stubs.c [iso-8859-1] Fri Aug 29 20:44:37 2008 @@ -7,7 +7,6 @@ STUB(KdpEnableSafeMem) STUB(KiIdleLoop) -STUB(KeAcquireInStackQueuedSpinLockRaiseToSynch) STUB(KeBugcheckCallbackListHead) STUB(ExpInterlockedPushEntrySList) STUB(NtContinue) @@ -131,12 +130,6 @@ STUB(IoWMIDeviceObjectToProviderId) STUB(KdDebuggerEnabled) STUB(KdDebuggerNotPresent) -STUB(KeAcquireQueuedSpinLock) -STUB(_imp__KeAcquireQueuedSpinLock) -STUB(_imp__KeReleaseQueuedSpinLock) -STUB(KeAcquireQueuedSpinLockRaiseToSynch) -STUB(KeAcquireSpinLockRaiseToDpc) -STUB(KeAcquireSpinLockRaiseToSynch) STUB(KeEnterCriticalRegion) STUB(KeEnterGuardedRegion) STUB(KeExpandKernelStackAndCallout) @@ -152,8 +145,6 @@ STUB(KeQueryMultiThreadProcessorSet) STUB(KeQueryPrcbAddress) STUB(KeReadStateMutex) -STUB(KeReleaseQueuedSpinLock) -STUB(KeReleaseSpinLock) STUB(KeRestoreFloatingPointState) STUB(KeSaveFloatingPointState) STUB(KeSaveStateForHibernate) @@ -161,8 +152,6 @@ STUB(KeSignalCallDpcDone) STUB(KeSignalCallDpcSynchronize) STUB(KeSynchronizeExecution) -STUB(KeTryToAcquireQueuedSpinLock) -STUB(KeTryToAcquireQueuedSpinLockRaiseToSynch) STUB(KeUpdateRunTime) STUB(KeUpdateSystemTime) STUB(KeUserModeCallback) @@ -245,10 +234,6 @@ STUB(_setjmp) STUB(_setjmpex) STUB(longjmp) -STUB(KfReleaseSpinLock) -STUB(KeAcquireInStackQueuedSpinLock) -STUB(KeReleaseInStackQueuedSpinLock) -STUB(KfAcquireSpinLock) STUB(KeProcessorArchitecture) STUB(KeProcessorLevel) STUB(KeProcessorRevision) Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] Fri Aug 29 20:44:37 2008 @@ -65,6 +65,9 @@ //#define KeArchFnInit() Ke386FnInit() #define KeArchFnInit() DbgPrint("KeArchFnInit is unimplemented!\n"); #define KeArchHaltProcessor() Ke386HaltProcessor() +#define KfLowerIrql KeLowerIrql +#define KfAcquireSpinLock KeAcquireSpinLock +#define KfReleaseSpinLock KeReleaseSpinLock extern ULONG Ke386CacheAlignment; Added: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/spinlock.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/spinlock.c (added) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/spinlock.c [iso-8859-1] Fri Aug 29 20:44:37 2008 @@ -1,0 +1,188 @@ +/* + * PROJECT: ReactOS HAL + * LICENSE: GPL - See COPYING in the top level directory + * FILE: hal/halx86/up/spinlock.c + * PURPOSE: Spinlock and Queued Spinlock Support + * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <ntoskrnl.h> +#define NDEBUG +#include <internal/debug.h> + +#undef KeAcquireSpinLock +#undef KeReleaseSpinLock + +/* FUNCTIONS *****************************************************************/ + +/* + * @implemented + */ +KIRQL +KeAcquireSpinLockRaiseToSynch(PKSPIN_LOCK SpinLock) +{ +#ifndef CONFIG_SMP + /* Simply raise to dispatch */ + return KfRaiseIrql(DISPATCH_LEVEL); +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +KIRQL +NTAPI +KeAcquireSpinLockRaiseToDpc(PKSPIN_LOCK SpinLock) +{ +#ifndef CONFIG_SMP + /* Simply raise to dispatch */ + return KfRaiseIrql(DISPATCH_LEVEL); +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +VOID +NTAPI +KeReleaseSpinLock(PKSPIN_LOCK SpinLock, + KIRQL OldIrql) +{ +#ifndef CONFIG_SMP + /* Simply lower IRQL back */ + KfLowerIrql(OldIrql); +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +KIRQL +KeAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber) +{ +#ifndef CONFIG_SMP + /* Simply raise to dispatch */ + return KfRaiseIrql(DISPATCH_LEVEL); +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +KIRQL +KeAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber) +{ +#ifndef CONFIG_SMP + /* Simply raise to dispatch */ + return KfRaiseIrql(DISPATCH_LEVEL); +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +VOID +KeAcquireInStackQueuedSpinLock(IN PKSPIN_LOCK SpinLock, + IN PKLOCK_QUEUE_HANDLE LockHandle) +{ +#ifndef CONFIG_SMP + /* Simply raise to dispatch */ + LockHandle->OldIrql = KfRaiseIrql(DISPATCH_LEVEL); +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +VOID +KeAcquireInStackQueuedSpinLockRaiseToSynch(IN PKSPIN_LOCK SpinLock, + IN PKLOCK_QUEUE_HANDLE LockHandle) +{ +#ifndef CONFIG_SMP + /* Simply raise to synch */ + LockHandle->OldIrql = KfRaiseIrql(SYNCH_LEVEL); +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +VOID +KeReleaseQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, + IN KIRQL OldIrql) +{ +#ifndef CONFIG_SMP + /* Simply lower IRQL back */ + KfLowerIrql(OldIrql); +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +VOID +KeReleaseInStackQueuedSpinLock(IN PKLOCK_QUEUE_HANDLE LockHandle) +{ +#ifndef CONFIG_SMP + /* Simply lower IRQL back */ + KfLowerIrql(LockHandle->OldIrql); +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +BOOLEAN +KeTryToAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, + IN PKIRQL OldIrql) +{ +#ifndef CONFIG_SMP + /* Simply raise to dispatch */ + *OldIrql = KfRaiseIrql(DISPATCH_LEVEL); + + /* Always return true on UP Machines */ + return TRUE; +#else + UNIMPLEMENTED; +#endif +} + +/* + * @implemented + */ +LOGICAL +KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, + OUT PKIRQL OldIrql) +{ +#ifndef CONFIG_SMP + /* Simply raise to dispatch */ + *OldIrql = KfRaiseIrql(DISPATCH_LEVEL); + + /* Always return true on UP Machines */ + return TRUE; +#else + UNIMPLEMENTED; +#endif +} + +/* EOF */ Propchange: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/spinlock.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/spinlock.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/spinlock.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/spinlock.c [iso-8859-1] Fri Aug 29 20:44:37 2008 @@ -86,6 +86,7 @@ /* PUBLIC FUNCTIONS **********************************************************/ +#ifdef _X86_ /* * @implemented */ @@ -96,6 +97,7 @@ /* Clear it */ *SpinLock = 0; } +#endif /* * @implemented Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-amd64hack.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-amd64hack.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-amd64hack.rbuild [iso-8859-1] Fri Aug 29 20:44:37 2008 @@ -95,6 +95,7 @@ <file>except.c</file> <file>irql.c</file> <file>kiinit.c</file> + <file>spinlock.c</file> <file>thrdini.c</file> <file>trap.S</file> </directory> Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl_amd64.def URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl_amd64.def [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl_amd64.def [iso-8859-1] Fri Aug 29 20:44:37 2008 @@ -4,16 +4,6 @@ ; EXPORTS ; -KfAcquireSpinLock -KfReleaseSpinLock -KefAcquireSpinLockAtDpcLevel -KefReleaseSpinLockFromDpcLevel -KeInitializeSpinLock -KeGetCurrentProcessorNumber -RtlConvertUlongToLargeInteger -RtlExtendedIntegerMultiply -; -; original: CcCanIWrite CcCopyRead CcCopyWrite
16 years, 3 months
1
0
0
0
[tkreuzer] 35781: define some fastcall functions to the normal functions on amd64
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 29 20:42:03 2008 New Revision: 35781 URL:
http://svn.reactos.org/svn/reactos?rev=35781&view=rev
Log: define some fastcall functions to the normal functions on amd64 Modified: branches/ros-amd64-bringup/reactos/drivers/network/ndis/include/ndissys.h Modified: branches/ros-amd64-bringup/reactos/drivers/network/ndis/include/ndissys.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/network/ndis/include/ndissys.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/network/ndis/include/ndissys.h [iso-8859-1] Fri Aug 29 20:42:03 2008 @@ -515,6 +515,13 @@ PULONG TotalCpuTime, PULONG ProcessorNumber); +/* portability fixes */ +#ifdef _M_AMD64 +#define KfReleaseSpinLock KeReleaseSpinLock +#define KefAcquireSpinLockAtDpcLevel KeAcquireSpinLockAtDpcLevel +#define KefReleaseSpinLockFromDpcLevel KeReleaseSpinLockFromDpcLevel +#endif + #endif /* __NDISSYS_H */ /* EOF */
16 years, 3 months
1
0
0
0
[tkreuzer] 35780: - Move KeAcquireSpinlockRaiseToSynch from ndk to ntifs.h - Add KeTryToAcquireQueuedSpinLock to ntifs.h - Fix Spinlock function prototypes in winddk.h
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 29 20:01:53 2008 New Revision: 35780 URL:
http://svn.reactos.org/svn/reactos?rev=35780&view=rev
Log: - Move KeAcquireSpinlockRaiseToSynch from ndk to ntifs.h - Add KeTryToAcquireQueuedSpinLock to ntifs.h - Fix Spinlock function prototypes in winddk.h Modified: branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h branches/ros-amd64-bringup/reactos/include/ddk/winddk.h branches/ros-amd64-bringup/reactos/include/ndk/kefuncs.h Modified: branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h [iso-8859-1] Fri Aug 29 20:01:53 2008 @@ -3631,28 +3631,67 @@ IN BOOLEAN AllowRawMount ); -#ifdef _M_AMD64 -NTKERNELAPI -#else +#if !defined (_M_AMD64) + NTHALAPI -#endif KIRQL FASTCALL KeAcquireQueuedSpinLock ( IN KSPIN_LOCK_QUEUE_NUMBER Number ); -#ifdef _M_AMD64 -NTKERNELAPI -#else NTHALAPI -#endif VOID FASTCALL KeReleaseQueuedSpinLock ( IN KSPIN_LOCK_QUEUE_NUMBER Number, IN KIRQL OldIrql ); + +NTHALAPI +KIRQL +FASTCALL +KeAcquireSpinLockRaiseToSynch( + IN OUT PKSPIN_LOCK SpinLock +); + +NTHALAPI +LOGICAL +FASTCALL +KeTryToAcquireQueuedSpinLock( + KSPIN_LOCK_QUEUE_NUMBER Number, + PKIRQL OldIrql); + +#else + +NTKERNELAPI +KIRQL +FASTCALL +KeAcquireQueuedSpinLock ( + IN KSPIN_LOCK_QUEUE_NUMBER Number +); + +NTKERNELAPI +VOID +FASTCALL +KeReleaseQueuedSpinLock ( + IN KSPIN_LOCK_QUEUE_NUMBER Number, + IN KIRQL OldIrql +); + +NTKERNELAPI +KIRQL +KeAcquireSpinLockRaiseToSynch( + IN OUT PKSPIN_LOCK SpinLock +); + +NTKERNELAPI +LOGICAL +KeTryToAcquireQueuedSpinLock( + KSPIN_LOCK_QUEUE_NUMBER Number, + PKIRQL OldIrql); + +#endif NTKERNELAPI VOID Modified: branches/ros-amd64-bringup/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ddk/winddk.h [iso-8859-1] Fri Aug 29 20:01:53 2008 @@ -5786,6 +5786,7 @@ } PCIBUSDATA, *PPCIBUSDATA; +/** INTERLOCKED FUNCTIONS *****************************************************/ #if !defined(__INTERLOCKED_DECLARED) #define __INTERLOCKED_DECLARED @@ -5902,38 +5903,30 @@ #define InterlockedPushEntrySList(Head, Entry) ExpInterlockedPushEntrySList(Head, Entry) #define InterlockedFlushSList(Head) ExpInterlockedFlushSList(Head) #define QueryDepthSList(Head) ExQueryDepthSList(Head) -#endif // !defined(_WINBASE_ +#endif // !defined(_WINBASE_) #endif // _M_AMD64 #endif /* !__INTERLOCKED_DECLARED */ -NTKERNELAPI -VOID + +/** SPINLOCK FUNCTIONS ********************************************************/ + +NTKERNELAPI +BOOLEAN FASTCALL -KefAcquireSpinLockAtDpcLevel( +KeTryToAcquireSpinLockAtDpcLevel( + IN OUT PKSPIN_LOCK SpinLock +); + +#if defined (_X86_) + +NTKERNELAPI +VOID +NTAPI +KeInitializeSpinLock( IN PKSPIN_LOCK SpinLock); -NTKERNELAPI -VOID -FASTCALL -KefReleaseSpinLockFromDpcLevel( - IN PKSPIN_LOCK SpinLock); - -#if defined(_M_AMD64) -NTKERNELAPI -KIRQL -FASTCALL -KfAcquireSpinLock( - IN PKSPIN_LOCK SpinLock); - -NTKERNELAPI -VOID -FASTCALL -KfReleaseSpinLock( - IN PKSPIN_LOCK SpinLock, - IN KIRQL NewIrql); -#else NTHALAPI KIRQL FASTCALL @@ -5946,19 +5939,60 @@ KfReleaseSpinLock( IN PKSPIN_LOCK SpinLock, IN KIRQL NewIrql); -#endif - -NTKERNELAPI -BOOLEAN + +NTKERNELAPI +VOID FASTCALL -KeTryToAcquireSpinLockAtDpcLevel( - IN OUT PKSPIN_LOCK SpinLock -); +KefAcquireSpinLockAtDpcLevel( + IN PKSPIN_LOCK SpinLock); + +NTKERNELAPI +VOID +FASTCALL +KefReleaseSpinLockFromDpcLevel( + IN PKSPIN_LOCK SpinLock); #define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock) #define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock) #define KeAcquireSpinLock(a,b) *(b) = KfAcquireSpinLock(a) #define KeReleaseSpinLock(a,b) KfReleaseSpinLock(a,b) + +#else // !defined (_X86_) + +FORCEINLINE +VOID +NTAPI +KeInitializeSpinLock( + PKSPIN_LOCK SpinLock) +{ + *SpinLock = 0; +} + +NTKERNELAPI +VOID +KeReleaseSpinLock( + IN PKSPIN_LOCK SpinLock, + IN KIRQL NewIrql); + +NTKERNELAPI +VOID +KeAcquireSpinLockAtDpcLevel( + IN PKSPIN_LOCK SpinLock); + +NTKERNELAPI +VOID +KeReleaseSpinLockFromDpcLevel( + IN PKSPIN_LOCK SpinLock); + +NTKERNELAPI +KIRQL +KeAcquireSpinLockRaiseToDpc( + IN PKSPIN_LOCK SpinLock); + +#define KeAcquireSpinLock(SpinLock, OldIrql) \ + *(OldIrql) = KeAcquireSpinLockRaiseToDpc(SpinLock) + +#endif // !defined (_X86_) #define RtlCopyMemoryNonTemporal RtlCopyMemory @@ -6358,23 +6392,60 @@ return Result; } +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlConvertUlongToLargeInteger( + ULONG UnsignedInteger) +{ + LARGE_INTEGER ret; + ret.QuadPart = UnsignedInteger; + return ret; +} + NTSYSAPI LUID NTAPI RtlConvertLongToLuid( IN LONG Long); -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlConvertUlongToLargeInteger( - IN ULONG UnsignedInteger); NTSYSAPI LUID NTAPI RtlConvertUlongToLuid( ULONG Ulong); + +#ifdef _M_AMD64 + +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlExtendedIntegerMultiply( + LARGE_INTEGER Multiplicand, + LONG Multiplier) +{ + LARGE_INTEGER ret; + ret.QuadPart = Multiplicand.QuadPart * Multiplier; + return ret; +} + +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlExtendedLargeIntegerDivide( + LARGE_INTEGER Dividend, + ULONG Divisor, + PULONG Remainder) +{ + LARGE_INTEGER ret; + ret.QuadPart = (ULONG64)Dividend.QuadPart / Divisor; + if (Remainder) + *Remainder = (ULONG)(Dividend.QuadPart % Divisor); + return ret; +} + +#endif /* * VOID @@ -9584,12 +9655,6 @@ NTKERNELAPI VOID NTAPI -KeInitializeSpinLock( - IN PKSPIN_LOCK SpinLock); - -NTKERNELAPI -VOID -NTAPI KeInitializeTimer( IN PKTIMER Timer); Modified: branches/ros-amd64-bringup/reactos/include/ndk/kefuncs.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ndk/kefuncs.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ndk/kefuncs.h [iso-8859-1] Fri Aug 29 20:01:53 2008 @@ -133,11 +133,6 @@ IN PKLOCK_QUEUE_HANDLE LockHandle ); -KIRQL -FASTCALL -KeAcquireSpinLockRaiseToSynch( - IN OUT PKSPIN_LOCK SpinLock -); // // Interrupt Functions
16 years, 3 months
1
0
0
0
[tkreuzer] 35779: Change DC and DC_ATTR members from MATRIX_S and EFLOAT_S, which are explicit fpu emulation types, instead use MATRIX and FLOATOBJ which are the class types. Plug in new FLOATOBJ api and remove old fpu using version. Implement XFORMOBJ api using FLOATOBJ. Remove most of the fpu using code from win32k.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 29 20:01:52 2008 New Revision: 35779 URL:
http://svn.reactos.org/svn/reactos?rev=35779&view=rev
Log: Change DC and DC_ATTR members from MATRIX_S and EFLOAT_S, which are explicit fpu emulation types, instead use MATRIX and FLOATOBJ which are the class types. Plug in new FLOATOBJ api and remove old fpu using version. Implement XFORMOBJ api using FLOATOBJ. Remove most of the fpu using code from win32k. Added: trunk/reactos/subsystems/win32/win32k/include/floatobj.h (with props) trunk/reactos/subsystems/win32/win32k/include/xformobj.h (with props) trunk/reactos/subsystems/win32/win32k/objects/xformobj.c (with props) Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h trunk/reactos/subsystems/win32/win32k/eng/float.c trunk/reactos/subsystems/win32/win32k/include/coord.h trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/include/gdifloat.h trunk/reactos/subsystems/win32/win32k/include/win32k.h trunk/reactos/subsystems/win32/win32k/objects/coord.c trunk/reactos/subsystems/win32/win32k/stubs/stubs.c trunk/reactos/subsystems/win32/win32k/win32k.rbuild Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -290,13 +290,13 @@ LONG lBreakExtra; LONG cBreak; HANDLE hlfntNew; - MATRIX_S mxWorldToDevice; - MATRIX_S mxDeviceToWorld; - MATRIX_S mxWorldToPage; - EFLOAT_S efM11PtoD; - EFLOAT_S efM22PtoD; - EFLOAT_S efDxPtoD; - EFLOAT_S efDyPtoD; + MATRIX mxWorldToDevice; + MATRIX mxDeviceToWorld; + MATRIX mxWorldToPage; + FLOATOBJ efM11PtoD; + FLOATOBJ efM22PtoD; + FLOATOBJ efDxPtoD; + FLOATOBJ efDyPtoD; INT iMapMode; DWORD dwLayout; LONG lWindowOrgx; Modified: trunk/reactos/subsystems/win32/win32k/eng/float.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/float.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/float.c [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -32,30 +32,6 @@ #define NDEBUG #include <debug.h> - -/* DEFINES *****************************************************************/ - -#ifdef _M_IX86 -#ifdef __GNUC__ -#define FLOAT_TO_INT(in,out) \ - __asm__ __volatile__ ("fistpl %0" : "=m" (out) : "t" (in) : "st"); -#else -#define FLOAT_TO_INT(in,out) \ - __asm fld in \ - __asm fistp out -#endif -#else -#define FLOAT_TO_INT(in,out) \ - out = (long)in; -#endif - -/* the following deal with IEEE single-precision numbers */ -#define EXCESS 126L -#define SIGNBIT 0x80000000L -#define SIGN(fp) ((fp) & SIGNBIT) -#define EXP(fp) (((fp) >> 23L) & 0xFF) -#define MANT(fp) ((fp) & 0x7FFFFFL) -#define PACK(s,e,m) ((s) | ((e) << 23L) | (m)) /* FUNCTIONS *****************************************************************/ @@ -101,525 +77,3 @@ } return TRUE; } - -VOID -FASTCALL -EF_Negate(EFLOAT_S * efp) -{ - efp->lMant = -efp->lMant; -} - -LONG -FASTCALL -EFtoF( EFLOAT_S * efp) -{ - long Mant, Exp, Sign = 0; - - if (!efp->lMant) return 0; - - Mant = efp->lMant; - Exp = efp->lExp; - Sign = SIGN(Mant); - -//// M$ storage emulation - if( Sign ) Mant = -Mant; - Mant = ((Mant & 0x3fffffff) >> 7); - Exp += (EXCESS-1); -//// - Mant = MANT(Mant); - return PACK(Sign, Exp, Mant); -} - -VOID -FASTCALL -FtoEF( EFLOAT_S * efp, FLOATL f) -{ - long Mant, Exp, Sign = 0; - gxf_long worker; - -#ifdef _X86_ - worker.l = f; // It's a float stored in a long. -#else - worker.f = f; -#endif - - Exp = EXP(worker.l); - Mant = MANT(worker.l); - if (SIGN(worker.l)) Sign = -1; -//// M$ storage emulation - Mant = ((Mant << 7) | 0x40000000); - Mant ^= Sign; - Mant -= Sign; - Exp -= (EXCESS-1); -//// - efp->lMant = Mant; - efp->lExp = Exp; -} - -VOID -STDCALL -FLOATOBJ_Add ( - IN OUT PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_2i3r.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - f.f = f.f + f1.f; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_AddFloat( - IN OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_0ip3.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long fe; - gxf_long f1; - fe.l = EFtoF(efp); -#ifdef _X86_ - f1.l = f; -#else - f1.f = f; -#endif - fe.f = fe.f + f1.f; -#ifdef _X86_ - FtoEF( efp, fe.l ); -#else - FtoEF( efp, fe.f ); -#endif -} - -VOID FASTCALL -XForm2MatrixS( MATRIX_S * Matrix, PXFORM XForm) -{ -gxf_long f; - f.f = XForm->eM11; - FtoEF( &Matrix->efM11, f.l); - f.f = XForm->eM12; - FtoEF( &Matrix->efM12, f.l); - f.f = XForm->eM21; - FtoEF( &Matrix->efM21, f.l); - f.f = XForm->eM22; - FtoEF( &Matrix->efM22, f.l); - f.f = XForm->eDx; - FtoEF( &Matrix->efDx, f.l); - f.f = XForm->eDy; - FtoEF( &Matrix->efDy, f.l); - Matrix->flAccel = 0; - if (XForm->eM12 == 0. && XForm->eM21 == 0.) - { - Matrix->flAccel |= MX_SCALE; - } -} - -VOID FASTCALL -MatrixS2XForm( PXFORM XForm, MATRIX_S * Matrix) -{ -gxf_long f; - f.l = EFtoF(&Matrix->efM11); - XForm->eM11 = f.f; - f.l = EFtoF(&Matrix->efM12); - XForm->eM12 = f.f; - f.l = EFtoF(&Matrix->efM21); - XForm->eM21 = f.f; - f.l = EFtoF(&Matrix->efM22); - XForm->eM22 = f.f; - f.l = EFtoF(&Matrix->efDx); - XForm->eDx = f.f; - f.l = EFtoF(&Matrix->efDy); - XForm->eDy = f.f; -} - - -VOID -STDCALL -FLOATOBJ_AddLong( - IN OUT PFLOATOBJ pf, - IN LONG l - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_12jr.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - f.f = f.f + l; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_Div( - IN OUT PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_3ndz.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - f.f = f.f / f1.f; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_DivFloat( - IN OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_0gfb.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long fe; - gxf_long f1; - fe.l = EFtoF(efp); -#ifdef _X86_ - f1.l = f; -#else - f1.f = f; -#endif - fe.f = fe.f / f1.f; -#ifdef _X86_ - FtoEF( efp, fe.l ); -#else - FtoEF( efp, fe.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_DivLong( - IN OUT PFLOATOBJ pf, - IN LONG l - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_6jdz.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - f.f = f.f / l; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -BOOL -STDCALL -FLOATOBJ_Equal( - IN PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_6ysn.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - if (f.f == f1.f) return TRUE; - return FALSE; -} - -BOOL -STDCALL -FLOATOBJ_EqualLong( - IN PFLOATOBJ pf, - IN LONG l - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_1pgn.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - if (f.f == l) return TRUE; - return FALSE; -} - -LONG -STDCALL -FLOATOBJ_GetFloat ( IN PFLOATOBJ pf ) -{ - //
www.osr.com/ddk/graphics/gdifncs_4d5z.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - return EFtoF(efp); -} - -LONG -STDCALL -FLOATOBJ_GetLong ( IN PFLOATOBJ pf ) -{ - //
www.osr.com/ddk/graphics/gdifncs_0tgn.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - long l; - - f.l = EFtoF( efp ); - FLOAT_TO_INT(f.f, l); // Let FPP handle it the fasty haxy way. - - return l; -} - -BOOL -STDCALL -FLOATOBJ_GreaterThan( - IN PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_8n53.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - if(f.f > f1.f) return TRUE; - return FALSE; -} - -BOOL -STDCALL -FLOATOBJ_GreaterThanLong( - IN PFLOATOBJ pf, - IN LONG l - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_6gx3.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - if (f.f > l) return TRUE; - return FALSE; -} - -BOOL -STDCALL -FLOATOBJ_LessThan( - IN PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_1ynb.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - if(f.f < f1.f) return TRUE; - return FALSE; -} - -BOOL -STDCALL -FLOATOBJ_LessThanLong( - IN PFLOATOBJ pf, - IN LONG l - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_9nzb.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - if (f.f < l) return TRUE; - return FALSE; -} - -VOID -STDCALL -FLOATOBJ_Mul( - IN OUT PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_8ppj.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - f.f = f1.f * f.f; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_MulFloat( - IN OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_3puv.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long fe; - gxf_long f1; - fe.l = EFtoF(efp); -#ifdef _X86_ - f1.l = f; -#else - f1.f = f; -#endif - fe.f = f1.f * fe.f; -#ifdef _X86_ - FtoEF( efp, fe.l ); -#else - FtoEF( efp, fe.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_MulLong( - IN OUT PFLOATOBJ pf, - IN LONG l - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_56lj.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - f.f = f.f * l; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_Neg ( IN OUT PFLOATOBJ pf ) -{ - //
www.osr.com/ddk/graphics/gdifncs_14pz.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - EF_Negate(efp); -} - -VOID -STDCALL -FLOATOBJ_SetFloat( - OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_1prb.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - FtoEF( efp, f); -} - -VOID -STDCALL -FLOATOBJ_SetLong( - OUT PFLOATOBJ pf, - IN LONG l - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_0gpz.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.f = (float) l; // Convert it now. -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_Sub( - IN OUT PFLOATOBJ pf, - IN PFLOATOBJ pf1 - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_6lyf.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - EFLOAT_S * efp1 = (EFLOAT_S *)pf1; - gxf_long f; - gxf_long f1; - f.l = EFtoF(efp); - f1.l = EFtoF(efp1); - f.f = f.f - f1.f; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_SubFloat( - IN OUT PFLOATOBJ pf, - IN FLOATL f - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_2zvr.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long fe; - gxf_long f1; - fe.l = EFtoF(efp); -#ifdef _X86_ - f1.l = f; -#else - f1.f = f; -#endif - fe.f = fe.f - f1.f; -#ifdef _X86_ - FtoEF( efp, fe.l ); -#else - FtoEF( efp, fe.f ); -#endif -} - -VOID -STDCALL -FLOATOBJ_SubLong( - IN OUT PFLOATOBJ pf, - IN LONG l - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_852f.htm
- EFLOAT_S * efp = (EFLOAT_S *)pf; - gxf_long f; - f.l = EFtoF(efp); - f.f = f.f - l; -#ifdef _X86_ - FtoEF( efp, f.l ); -#else - FtoEF( efp, f.f ); -#endif -} Modified: trunk/reactos/subsystems/win32/win32k/include/coord.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/coord.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/coord.h [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -3,25 +3,16 @@ #include <include/dc.h> -VOID -FASTCALL -IntDPtoLP ( PDC dc, LPPOINT Points, INT Count ); - -VOID -FASTCALL -CoordDPtoLP ( PDC Dc, LPPOINT Point ); +#define IntDPtoLP(dc, pp, c) XFORMOBJ_bApplyXform((XFORMOBJ*)&(dc)->DcLevel.mxDeviceToWorld, XF_LTOL, c, pp, pp); +#define IntLPtoDP(dc, pp, c) XFORMOBJ_bApplyXform((XFORMOBJ*)&(dc)->DcLevel.mxWorldToDevice, XF_LTOL, c, pp, pp); +#define CoordDPtoLP(dc, pp) XFORMOBJ_bApplyXform((XFORMOBJ*)&(dc)->DcLevel.mxDeviceToWorld, XF_LTOL, 1, pp, pp); +#define CoordLPtoDP(dc, pp) XFORMOBJ_bApplyXform((XFORMOBJ*)&(dc)->DcLevel.mxWorldToDevice, XF_LTOL, 1, pp, pp); +#define XForm2MatrixS(m, x) XFORMOBJ_iSetXform((XFORMOBJ*)m, (XFORML*)x) +#define MatrixS2XForm(x, m) XFORMOBJ_iGetXform((XFORMOBJ*)m, (XFORML*)x) int FASTCALL IntGetGraphicsMode ( PDC dc ); - -VOID -FASTCALL -CoordLPtoDP ( PDC Dc, LPPOINT Point ); - -VOID -FASTCALL -IntLPtoDP ( PDC dc, LPPOINT Points, INT Count ); int STDCALL IntGdiSetMapMode(PDC, int); Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -77,17 +77,17 @@ BOOL ufiSet; FLONG fl; FLONG flBrush; - MATRIX_S mxWorldToDevice; - MATRIX_S mxDeviceToWorld; - MATRIX_S mxWorldToPage; - EFLOAT_S efM11PtoD; - EFLOAT_S efM22PtoD; - EFLOAT_S efDxPtoD; - EFLOAT_S efDyPtoD; - EFLOAT_S efM11_TWIPS; - EFLOAT_S efM22_TWIPS; - EFLOAT_S efPr11; - EFLOAT_S efPr22; + MATRIX mxWorldToDevice; + MATRIX mxDeviceToWorld; + MATRIX mxWorldToPage; + FLOATOBJ efM11PtoD; + FLOATOBJ efM22PtoD; + FLOATOBJ efDxPtoD; + FLOATOBJ efDyPtoD; + FLOATOBJ efM11_TWIPS; + FLOATOBJ efM22_TWIPS; + FLOATOBJ efPr11; + FLOATOBJ efPr22; PBITMAPOBJ pSurface; // SURFACE* SIZE sizl; } DCLEVEL, *PDCLEVEL; Added: trunk/reactos/subsystems/win32/win32k/include/floatobj.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/floatobj.h (added) +++ trunk/reactos/subsystems/win32/win32k/include/floatobj.h [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -1,0 +1,73 @@ +#ifndef _WIN32K_FLOATOBJ_H_ +#define _WIN32K_FLOATOBJ_H_ + +#if defined(_X86_) + +FORCEINLINE +BOOL +_FLOATOBJ_Equal(FLOATOBJ *pf1, FLOATOBJ *pf2) +{ + EFLOAT_S *pef1 = (EFLOAT_S*)pf1; + EFLOAT_S *pef2 = (EFLOAT_S*)pf2; + return (pef1->lMant == pef2->lMant && pef1->lExp == pef2->lExp); +} + +FORCEINLINE +LONG +_FLOATOBJ_GetLong(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + return pef->lMant >> (32 - pef->lExp); +} + +FORCEINLINE +LONG +_FLOATOBJ_GetFix(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + LONG Shift = (28 - pef->lExp); + return (Shift >= 0 ? pef->lMant >> Shift : pef->lMant << -Shift); +} + +FORCEINLINE +BOOL +_FLOATOBJ_IsLong(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + ULONG Shift = 32 - pef->lExp; + return (((pef->lMant >> Shift) << Shift) == pef->lMant); +} + +FORCEINLINE +BOOL +_FLOATOBJ_Equal0(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + return (pef->lMant == 0 && pef->lExp == 0); +} + +FORCEINLINE +BOOL +_FLOATOBJ_Equal1(FLOATOBJ *pf) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + return (pef->lMant == 0x40000000 && pef->lExp == 2); +} + +#define FLOATOBJ_Set0(fo) (fo)->ul1 = 0; (fo)->ul2 = 0; +#define FLOATOBJ_Set1(fo) (fo)->ul1 = 0x40000000; (fo)->ul2 = 2; + +#else + +#define _FLOATOBJ_Equal(pf,pf1) (*(pf) == *(pf1)) +#define _FLOATOBJ_GetLong(pf) ((LONG)*(pf)) +#define _FLOATOBJ_IsLong(pf) ((FLOAT)((LONG)*(pf)) == *(pf)) +#define _FLOATOBJ_Equal0(pf) (*(pf) == 0.) +#define _FLOATOBJ_Equal1(pf) (*(pf) == 1.) + +#define FLOATOBJ_Set0(fo) *(fo) = 0; +#define FLOATOBJ_Set1(fo) *(fo) = 1; + +#endif + +#endif /* not _WIN32K_FLOATOBJ_H_ */ Propchange: trunk/reactos/subsystems/win32/win32k/include/floatobj.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/subsystems/win32/win32k/include/gdifloat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/gdifloat.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/gdifloat.h [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -24,9 +24,8 @@ } -VOID FASTCALL XForm2MatrixS( MATRIX_S *, PXFORM); -VOID FASTCALL MatrixS2XForm( PXFORM, MATRIX_S *); -/* Performs a world-to-viewport transformation on the specified point (which +/* FIXME: Do not use the fpu in kernel on x86, use FLOATOBJ_Xxx api instead + * Performs a world-to-viewport transformation on the specified point (which * is in floating point format). */ static __inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point) Modified: trunk/reactos/subsystems/win32/win32k/include/win32k.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/win32k.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/win32k.h [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -12,8 +12,6 @@ #define INTERNAL_CALL NTAPI /* Internal Win32k Headers */ -#include <include/driver.h> - #include <include/accelerator.h> #include <include/clipboard.h> #include <include/cliprgn.h> @@ -29,13 +27,16 @@ #include <include/dc.h> #include <include/dce.h> #include <include/dib.h> +#include <include/driver.h> #include <include/error.h> +#include <include/floatobj.h> #include <include/gdiobj.h> #include <include/palette.h> #include <include/rect.h> #include <include/win32.h> #include <include/window.h> #include <include/winsta.h> +#include <include/xformobj.h> #include <include/region.h> #include <include/ntuser.h> @@ -74,4 +75,5 @@ #include <eng/objects.h> #include <eng/misc.h> #include <dib/dib.h> + #endif /* __WIN32K_H */ Added: trunk/reactos/subsystems/win32/win32k/include/xformobj.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/xformobj.h (added) +++ trunk/reactos/subsystems/win32/win32k/include/xformobj.h [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -1,0 +1,31 @@ +#ifndef _WIN32K_XFORMOBJ_H_ +#define _WIN32K_XFORMOBJ_H_ + +ULONG +INTERNAL_CALL +XFORMOBJ_iSetXform( + OUT XFORMOBJ *pxo, + IN XFORML * pxform); + +ULONG +INTERNAL_CALL +XFORMOBJ_iCombine( + IN XFORMOBJ *pxo, + IN XFORMOBJ *pxo1, + IN XFORMOBJ *pxo2); + +ULONG +INTERNAL_CALL +XFORMOBJ_iCombineXform( + IN XFORMOBJ *pxo, + IN XFORMOBJ *pxo1, + IN XFORML *pxform, + IN BOOL bLeftMultiply); + +ULONG +INTERNAL_CALL +XFORMOBJ_Inverse( + OUT XFORMOBJ *pxoDst, + IN XFORMOBJ *pxoSrc); + +#endif /* not _WIN32K_XFORMOBJ_H_ */ Propchange: trunk/reactos/subsystems/win32/win32k/include/xformobj.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -116,33 +116,6 @@ return Ret; } -VOID FASTCALL -CoordDPtoLP(PDC Dc, LPPOINT Point) -{ -FLOAT x, y; - x = (FLOAT)Point->x; - y = (FLOAT)Point->y; - XFORM xformVport2World; - - MatrixS2XForm(&xformVport2World, &Dc->DcLevel.mxDeviceToWorld); - - Point->x = x * xformVport2World.eM11 + - y * xformVport2World.eM21 + xformVport2World.eDx; - Point->y = x * xformVport2World.eM12 + - y * xformVport2World.eM22 + xformVport2World.eDy; -} - -VOID -FASTCALL -IntDPtoLP ( PDC dc, LPPOINT Points, INT Count ) -{ - INT i; - - ASSERT ( Points ); - - for ( i = 0; i < Count; i++ ) - CoordDPtoLP ( dc, &Points[i] ); -} int FASTCALL @@ -245,38 +218,6 @@ return NT_SUCCESS(Status); } -VOID -FASTCALL -CoordLPtoDP ( PDC Dc, LPPOINT Point ) -{ - FLOAT x, y; - XFORM xformWorld2Vport; - - ASSERT(Dc); - ASSERT(Point); - - x = (FLOAT)Point->x; - y = (FLOAT)Point->y; - - MatrixS2XForm(&xformWorld2Vport, &Dc->DcLevel.mxWorldToDevice); - - Point->x = x * xformWorld2Vport.eM11 + - y * xformWorld2Vport.eM21 + xformWorld2Vport.eDx; - Point->y = x * xformWorld2Vport.eM12 + - y * xformWorld2Vport.eM22 + xformWorld2Vport.eDy; -} - -VOID -FASTCALL -IntLPtoDP ( PDC dc, LPPOINT Points, INT Count ) -{ - INT i; - - ASSERT ( Points ); - - for ( i = 0; i < Count; i++ ) - CoordLPtoDP ( dc, &Points[i] ); -} /*! * Converts points from logical coordinates into device coordinates. Conversion depends on the mapping mode, Added: trunk/reactos/subsystems/win32/win32k/objects/xformobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/xformobj.c (added) +++ trunk/reactos/subsystems/win32/win32k/objects/xformobj.c [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -1,0 +1,525 @@ +/* + * PROJECT: ReactOS win32 kernel mode subsystem + * LICENSE: GPL - See COPYING in the top level directory + * FILE: subsystems/win32/win32k/objects/xformobj.c + * PURPOSE: XFORMOBJ api + * PROGRAMMER: Timo Kreuzer + */ + +/** Includes ******************************************************************/ + +#include <w32k.h> +#define NDEBUG +#include <debug.h> + +C_ASSERT(sizeof(FIX) == sizeof(LONG)); +#define FIX2LONG(x) ((x) >> 4) +#define LONG2FIX(x) ((x) << 4) + +#define FLOATOBJ_Equal _FLOATOBJ_Equal +#define FLOATOBJ_GetLong _FLOATOBJ_GetLong +#define FLOATOBJ_GetFix _FLOATOBJ_GetFix +#define FLOATOBJ_IsLong _FLOATOBJ_IsLong +#define FLOATOBJ_Equal0 _FLOATOBJ_Equal0 +#define FLOATOBJ_Equal1 _FLOATOBJ_Equal1 + +/** Inline helper functions ***************************************************/ + +/* + * Inline helper to calculate pfo1 * pfo2 + pfo3 * pfo4 + */ +VOID FORCEINLINE +MulAdd( + PFLOATOBJ pfoDest, + PFLOATOBJ pfo1, + PFLOATOBJ pfo2, + PFLOATOBJ pfo3, + PFLOATOBJ pfo4) +{ + FLOATOBJ foTmp; + + *pfoDest = *pfo1; + FLOATOBJ_Mul(pfoDest, pfo2); + foTmp = *pfo3; + FLOATOBJ_Mul(&foTmp, pfo4); + FLOATOBJ_Add(pfoDest, &foTmp); +} + +/* + * Inline helper to calculate pfo1 * l2 + pfo3 * l4 + */ +VOID FORCEINLINE +MulAddLong( + PFLOATOBJ pfoDest, + PFLOATOBJ pfo1, + LONG l2, + PFLOATOBJ pfo3, + LONG l4) +{ + FLOATOBJ foTmp; + + *pfoDest = *pfo1; + FLOATOBJ_MulLong(pfoDest, l2); + foTmp = *pfo3; + FLOATOBJ_MulLong(&foTmp, l4); + FLOATOBJ_Add(pfoDest, &foTmp); +} + +/* + * Inline helper to calculate pfo1 * pfo2 - pfo3 * pfo4 + */ +VOID FORCEINLINE +MulSub( + PFLOATOBJ pfoDest, + PFLOATOBJ pfo1, + PFLOATOBJ pfo2, + PFLOATOBJ pfo3, + PFLOATOBJ pfo4) +{ + FLOATOBJ foTmp; + + *pfoDest = *pfo1; + FLOATOBJ_Mul(pfoDest, pfo2); + foTmp = *pfo3; + FLOATOBJ_Mul(&foTmp, pfo4); + FLOATOBJ_Sub(pfoDest, &foTmp); +} + +/* + * Inline helper to get the complexity hint from flAccel + */ +ULONG FORCEINLINE +HintFromAccel(ULONG flAccel) +{ + switch (flAccel & (MX_NOTRANSLATE | MX_IDENTITYSCALE | MX_SCALE)) + { + case (MX_SCALE | MX_IDENTITYSCALE | MX_NOTRANSLATE): + return GX_IDENTITY; + case (MX_SCALE | MX_IDENTITYSCALE): + return GX_OFFSET; + case MX_SCALE: + return GX_SCALE; + default: + return GX_GENERAL; + } +} + +/** Internal functions ********************************************************/ + +ULONG +INTERNAL_CALL +XFORMOBJ_UpdateAccel( + IN XFORMOBJ *pxo) +{ + PMATRIX pmx = (PMATRIX)pxo; + + /* Copy Dx and Dy to FIX format */ + pmx->fxDx = FLOATOBJ_GetFix(&pmx->efDx); + pmx->fxDy = FLOATOBJ_GetFix(&pmx->efDy); + + pmx->flAccel = 0; + + if (FLOATOBJ_Equal0(&pmx->efDx) && + FLOATOBJ_Equal0(&pmx->efDy)) + { + pmx->flAccel |= MX_NOTRANSLATE; + } + + if (FLOATOBJ_Equal0(&pmx->efM12) && + FLOATOBJ_Equal0(&pmx->efM21)) + { + pmx->flAccel |= MX_SCALE; + } + + if (FLOATOBJ_Equal1(&pmx->efM11) && + FLOATOBJ_Equal1(&pmx->efM22)) + { + pmx->flAccel |= MX_IDENTITYSCALE; + } + + if (FLOATOBJ_IsLong(&pmx->efM11) && FLOATOBJ_IsLong(&pmx->efM12) && + FLOATOBJ_IsLong(&pmx->efM21) && FLOATOBJ_IsLong(&pmx->efM22)) + { + pmx->flAccel |= MX_INTEGER; + } + + return HintFromAccel(pmx->flAccel); +} + + +ULONG +INTERNAL_CALL +XFORMOBJ_iSetXform( + OUT XFORMOBJ *pxo, + IN XFORML * pxform) +{ + PMATRIX pmx = (PMATRIX)pxo; + + /* Check parameters */ + if (!pxo || !pxform) + { + return DDI_ERROR; + } + + /* Copy members */ + FLOATOBJ_SetFloat(&pmx->efM11, pxform->eM11); + FLOATOBJ_SetFloat(&pmx->efM12, pxform->eM12); + FLOATOBJ_SetFloat(&pmx->efM21, pxform->eM21); + FLOATOBJ_SetFloat(&pmx->efM22, pxform->eM22); + FLOATOBJ_SetFloat(&pmx->efDx, pxform->eDx); + FLOATOBJ_SetFloat(&pmx->efDy, pxform->eDy); + + /* Update accelerators and return complexity */ + return XFORMOBJ_UpdateAccel(pxo); +} + + +/* + * Multiplies pxo1 with pxo2 and stores the result in pxo. + * returns complexity hint + * | efM11 efM12 0 | + * | efM21 efM22 0 | + * | efDx efDy 1 | + */ +ULONG +INTERNAL_CALL +XFORMOBJ_iCombine( + IN XFORMOBJ *pxo, + IN XFORMOBJ *pxo1, + IN XFORMOBJ *pxo2) +{ + MATRIX mx; + PMATRIX pmx, pmx1, pmx2; + + pmx = (PMATRIX)pxo; + pmx1 = (PMATRIX)pxo1; + pmx2 = (PMATRIX)pxo2; + + /* Do a 3 x 3 matrix multiplication with mx as destinantion */ + MulAdd(&mx.efM11, &pmx1->efM11, &pmx2->efM11, &pmx1->efM12, &pmx2->efM21); + MulAdd(&mx.efM12, &pmx1->efM11, &pmx2->efM12, &pmx1->efM12, &pmx2->efM22); + MulAdd(&mx.efM21, &pmx1->efM21, &pmx2->efM11, &pmx1->efM22, &pmx2->efM21); + MulAdd(&mx.efM22, &pmx1->efM21, &pmx2->efM12, &pmx1->efM22, &pmx2->efM22); + MulAdd(&mx.efDx, &pmx1->efDx, &pmx2->efM11, &pmx1->efDy, &pmx2->efM21); + FLOATOBJ_Add(&mx.efDx, &pmx2->efDx); + MulAdd(&mx.efDy, &pmx1->efDx, &pmx2->efM12, &pmx1->efDy, &pmx2->efM22); + FLOATOBJ_Add(&mx.efDy, &pmx2->efDy); + + /* Copy back */ + *pmx = mx; + + /* Update accelerators and return complexity */ + return XFORMOBJ_UpdateAccel(pxo); +} + + +ULONG +INTERNAL_CALL +XFORMOBJ_iCombineXform( + IN XFORMOBJ *pxo, + IN XFORMOBJ *pxo1, + IN XFORML *pxform, + IN BOOL bLeftMultiply) +{ + MATRIX mx; + XFORMOBJ *pxo2 = (XFORMOBJ*)&mx; + + XFORMOBJ_iSetXform(pxo2, pxform); + + if (bLeftMultiply) + { + return XFORMOBJ_iCombine(pxo, pxo2, pxo1); + } + else + { + return XFORMOBJ_iCombine(pxo, pxo1, pxo2); + } +} + +/* + * A^-1 = adj(A) / det(AT) + * A^-1 = 1/(a*d - b*c) * (a22,-a12,a21,-a11) + */ +ULONG +INTERNAL_CALL +XFORMOBJ_Inverse( + OUT XFORMOBJ *pxoDst, + IN XFORMOBJ *pxoSrc) +{ + PMATRIX pmxDst, pmxSrc; + FLOATOBJ foDet; + + pmxDst = (PMATRIX)pxoDst; + pmxSrc = (PMATRIX)pxoSrc; + + /* det = M11 * M22 - M12 * M21 */ + MulSub(&foDet, &pmxSrc->efM11, &pmxSrc->efM22, &pmxSrc->efM12, &pmxSrc->efM21); + + if (FLOATOBJ_Equal0(&foDet)) + { + /* Determinant is 0! */ + return DDI_ERROR; + } + + /* Calculate adj(A) / det(A) */ + pmxDst->efM11 = pmxSrc->efM22; + FLOATOBJ_Div(&pmxDst->efM11, &foDet); + pmxDst->efM22 = pmxSrc->efM11; + FLOATOBJ_Div(&pmxDst->efM22, &foDet); + + /* The other 2 are negative, negate foDet for that */ + FLOATOBJ_Neg(&foDet); + pmxDst->efM12 = pmxSrc->efM21; + FLOATOBJ_Div(&pmxDst->efM12, &foDet); + pmxDst->efM21 = pmxSrc->efM12; + FLOATOBJ_Div(&pmxDst->efM22, &foDet); + + /* Update accelerators and return complexity */ + return XFORMOBJ_UpdateAccel(pxoDst); +} + + +BOOL +INTERNAL_CALL +XFORMOBJ_bXformFixPoints( + IN XFORMOBJ *pxo, + IN ULONG cPoints, + IN PPOINTL pptIn, + OUT PPOINTL pptOut) +{ + PMATRIX pmx; + INT i; + FLOATOBJ fo1, fo2; + FLONG flAccel; + + pmx = (PMATRIX)pxo; + flAccel = pmx->flAccel & (MX_INTEGER|MX_SCALE|MX_IDENTITYSCALE); + + switch (flAccel) + { + case (MX_SCALE | MX_IDENTITYSCALE): + case (MX_SCALE | MX_IDENTITYSCALE | MX_INTEGER): + /* Identity transformation, nothing todo */ + break; + + case (MX_IDENTITYSCALE | MX_INTEGER): + /* 1-scale integer transform */ + i = cPoints - 1; + do + { + LONG x = pptIn[i].x + pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21); + LONG y = pptIn[i].y + pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12); + pptOut[i].y = y; + pptOut[i].x = x; + } + while (--i >= 0); + break; + + case (MX_SCALE | MX_INTEGER): + /* Diagonal integer transform */ + i = cPoints - 1; + do + { + pptOut[i].x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11); + pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22); + } + while (--i >= 0); + break; + + case (MX_INTEGER): + /* Full integer transform */ + i = cPoints - 1; + do + { + LONG x; + x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11); + x += pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21); + pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22); + pptOut[i].y += pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12); + pptOut[i].x = x; + } + while (--i >= 0); + break; + + case (MX_IDENTITYSCALE): + /* 1-scale transform */ + i = cPoints - 1; + do + { + fo1 = pmx->efM21; + FLOATOBJ_MulLong(&fo1, pptIn[i].y); + fo2 = pmx->efM12; + FLOATOBJ_MulLong(&fo2, pptIn[i].x); + pptOut[i].x = pptIn[i].x + FLOATOBJ_GetLong(&fo1); + pptOut[i].y = pptIn[i].y + FLOATOBJ_GetLong(&fo2); + } + while (--i >= 0); + break; + + case (MX_SCALE): + /* Diagonal float transform */ + i = cPoints - 1; + do + { + fo1 = pmx->efM11; + FLOATOBJ_MulLong(&fo1, pptIn[i].x); + pptOut[i].x = FLOATOBJ_GetLong(&fo1); + fo2 = pmx->efM22; + FLOATOBJ_MulLong(&fo2, pptIn[i].y); + pptOut[i].y = FLOATOBJ_GetLong(&fo2); + } + while (--i >= 0); + break; + + default: + /* Full float transform */ + i = cPoints - 1; + do + { + MulAddLong(&fo1, &pmx->efM11, pptIn[i].x, &pmx->efM21, pptIn[i].y); + MulAddLong(&fo2, &pmx->efM12, pptIn[i].x, &pmx->efM22, pptIn[i].y); + pptOut[i].x = FLOATOBJ_GetLong(&fo1); + pptOut[i].y = FLOATOBJ_GetLong(&fo2); + } + while (--i >= 0); + break; + } + + if (!(pmx->flAccel & MX_NOTRANSLATE)) + { + /* Translate points */ + i = cPoints - 1; + do + { +// DPRINT1("Translating Points (%d,%d)->(%d,%d)\n", pptOut[i].x, pptOut[i].y, pptOut[i].x + pmx->fxDx, pptOut[i].y + pmx->fxDy); + pptOut[i].x += pmx->fxDx; + pptOut[i].y += pmx->fxDy; + } + while (--i >= 0); + } + + return TRUE; +} + +/** Public functions **********************************************************/ + +//
www.osr.com/ddk/graphics/gdifncs_0s2v.htm
+ULONG +NTAPI +XFORMOBJ_iGetXform( + IN XFORMOBJ *pxo, + OUT XFORML *pxform) +{ + PMATRIX pmx = (PMATRIX)pxo; + + /* Check parameters */ + if (!pxo || !pxform) + { + return DDI_ERROR; + } + + /* Copy members */ + pxform->eM11 = FLOATOBJ_GetFloat(&pmx->efM11); + pxform->eM12 = FLOATOBJ_GetFloat(&pmx->efM12); + pxform->eM21 = FLOATOBJ_GetFloat(&pmx->efM21); + pxform->eM22 = FLOATOBJ_GetFloat(&pmx->efM22); + pxform->eDx = FLOATOBJ_GetFloat(&pmx->efDx); + pxform->eDy = FLOATOBJ_GetFloat(&pmx->efDy); + + /* Return complexity hint */ + return HintFromAccel(pmx->flAccel); +} + + +//
www.osr.com/ddk/graphics/gdifncs_5ig7.htm
+ULONG +NTAPI +XFORMOBJ_iGetFloatObjXform( + IN XFORMOBJ *pxo, + OUT FLOATOBJ_XFORM *pxfo) +{ + PMATRIX pmx = (PMATRIX)pxo; + + /* Check parameters */ + if (!pxo || !pxfo) + { + return DDI_ERROR; + } + + /* Copy members */ + pxfo->eM11 = pmx->efM11; + pxfo->eM12 = pmx->efM12; + pxfo->eM21 = pmx->efM21; + pxfo->eM22 = pmx->efM22; + pxfo->eDx = pmx->efDx; + pxfo->eDy = pmx->efDy; + + /* Return complexity hint */ + return HintFromAccel(pmx->flAccel); +} + + +//
www.osr.com/ddk/graphics/gdifncs_027b.htm
+BOOL +NTAPI +XFORMOBJ_bApplyXform( + IN XFORMOBJ *pxo, + IN ULONG iMode, + IN ULONG cPoints, + IN PVOID pvIn, + OUT PVOID pvOut) +{ + MATRIX mx; + POINTL *pptl; + INT i; + + /* Check parameters */ + if (!pxo || !pvIn || !pvOut || cPoints < 1) + { + return FALSE; + } + + /* Use inverse xform? */ + if (iMode == XF_INV_FXTOL || iMode == XF_INV_LTOL) + { + ULONG ret; + ret = XFORMOBJ_Inverse((XFORMOBJ*)&mx, pxo); + if (ret == DDI_ERROR) + { + return FALSE; + } + pxo = (XFORMOBJ*)&mx; + } + + /* Convert POINTL to POINTFIX? */ + if (iMode == XF_LTOFX || iMode == XF_LTOL || iMode == XF_INV_LTOL) + { + pptl = pvIn; + for (i = cPoints - 1; i >= 0; i--) + { + pptl[i].x = LONG2FIX(pptl[i].x); + pptl[i].y = LONG2FIX(pptl[i].y); + } + } + + /* Do the actual fixpoint transformation */ + if (!XFORMOBJ_bXformFixPoints(pxo, cPoints, pvIn, pvOut)) + { + return FALSE; + } + + /* Convert POINTFIX to POINTL? */ + if (iMode == XF_INV_FXTOL || iMode == XF_INV_LTOL || iMode == XF_LTOL) + { + pptl = pvOut; + for (i = cPoints - 1; i >= 0; i--) + { + pptl[i].x = FIX2LONG(pptl[i].x); + pptl[i].y = FIX2LONG(pptl[i].y); + } + } + + return TRUE; +} + +/* EOF */ Propchange: trunk/reactos/subsystems/win32/win32k/objects/xformobj.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/subsystems/win32/win32k/stubs/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/st…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/stubs/stubs.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/stubs/stubs.c [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -734,45 +734,6 @@ { //
www.osr.com/ddk/graphics/gdifncs_8qp3.htm
UNIMPLEMENTED; -} - -BOOL -APIENTRY -XFORMOBJ_bApplyXform( - IN XFORMOBJ *pxo, - IN ULONG iMode, - IN ULONG cPoints, - IN PVOID pvIn, - OUT PVOID pvOut - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_027b.htm
- UNIMPLEMENTED; - return FALSE; -} - -ULONG -APIENTRY -XFORMOBJ_iGetFloatObjXform( - IN XFORMOBJ *pxo, - OUT FLOATOBJ_XFORM *pxfo - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_5ig7.htm
- UNIMPLEMENTED; - return 0; -} - -ULONG -APIENTRY -XFORMOBJ_iGetXform( - IN XFORMOBJ *pxo, - OUT XFORML *pxform - ) -{ - //
www.osr.com/ddk/graphics/gdifncs_0s2v.htm
- UNIMPLEMENTED; - return 0; } /* Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/wi…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] Fri Aug 29 20:01:52 2008 @@ -53,6 +53,11 @@ <file>error.c</file> <file>event.c</file> <file>float.c</file> + <if property="ARCH" value="i386"> + <directory name="i386"> + <file>floatobj.S</file> + </directory> + </if> <file>gradient.c</file> <file>lineto.c</file> <file>mem.c</file> @@ -82,7 +87,7 @@ <file>copy.c</file> <file>usrheap.c</file> <if property="ARCH" value="i386"> - <directory name="i386"> + <directory name="i386"> <file>cos_asm.s</file> <file>sin_asm.s</file> <file>atan2_asm.s</file> @@ -173,6 +178,7 @@ <file>stockobj.c</file> <file>text.c</file> <file>wingl.c</file> + <file>xformobj.c</file> </directory> <directory name="stubs"> <file>stubs.c</file>
16 years, 3 months
1
0
0
0
[tkreuzer] 35778: add needed ros specific exports back to user32.spec
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 29 19:41:21 2008 New Revision: 35778 URL:
http://svn.reactos.org/svn/reactos?rev=35778&view=rev
Log: add needed ros specific exports back to user32.spec Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.spec Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.spec [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.spec [iso-8859-1] Fri Aug 29 19:41:21 2008 @@ -767,3 +767,7 @@ @ varargs wsprintfW(wstr wstr) @ stdcall wvsprintfA(ptr str ptr) @ stdcall wvsprintfW(ptr wstr ptr) + +# ROS specific exports +@ stdcall PrivateCsrssManualGuiCheck(long) +@ stdcall PrivateCsrssInitialized()
16 years, 3 months
1
0
0
0
[tkreuzer] 35777: fix ws2_32 spec file
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 29 19:25:58 2008 New Revision: 35777 URL:
http://svn.reactos.org/svn/reactos?rev=35777&view=rev
Log: fix ws2_32 spec file Modified: branches/ros-amd64-bringup/reactos/dll/win32/ws2_32/ws2_32.spec Modified: branches/ros-amd64-bringup/reactos/dll/win32/ws2_32/ws2_32.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/ws2_32/ws2_32.spec [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/ws2_32/ws2_32.spec [iso-8859-1] Fri Aug 29 19:25:58 2008 @@ -1,33 +1,33 @@ -1 stdcall accept(long ptr ptr) WS_accept -2 stdcall bind(long ptr long) WS_bind -3 stdcall closesocket(long) WS_closesocket -4 stdcall connect(long ptr long) WS_connect -5 stdcall getpeername(long ptr ptr) WS_getpeername -6 stdcall getsockname(long ptr ptr) WS_getsockname -7 stdcall getsockopt(long long long ptr ptr) WS_getsockopt -8 stdcall htonl(long) WS_htonl -9 stdcall htons(long) WS_htons -10 stdcall ioctlsocket(long long ptr) WS_ioctlsocket -11 stdcall inet_addr(str) WS_inet_addr -12 stdcall inet_ntoa(ptr) WS_inet_ntoa -13 stdcall listen(long long) WS_listen -14 stdcall ntohl(long) WS_ntohl -15 stdcall ntohs(long) WS_ntohs -16 stdcall recv(long ptr long long) WS_recv -17 stdcall recvfrom(long ptr long long ptr ptr) WS_recvfrom -18 stdcall select(long ptr ptr ptr ptr) WS_select -19 stdcall send(long ptr long long) WS_send -20 stdcall sendto(long ptr long long ptr long) WS_sendto -21 stdcall setsockopt(long long long ptr long) WS_setsockopt -22 stdcall shutdown(long long) WS_shutdown -23 stdcall socket(long long long) WS_socket -51 stdcall gethostbyaddr(ptr long long) WS_gethostbyaddr -52 stdcall gethostbyname(str) WS_gethostbyname -53 stdcall getprotobyname(str) WS_getprotobyname -54 stdcall getprotobynumber(long) WS_getprotobynumber -55 stdcall getservbyname(str str) WS_getservbyname -56 stdcall getservbyport(long str) WS_getservbyport -57 stdcall gethostname(ptr long) WS_gethostname +1 stdcall accept(long ptr ptr) +2 stdcall bind(long ptr long) +3 stdcall closesocket(long) +4 stdcall connect(long ptr long) +5 stdcall getpeername(long ptr ptr) +6 stdcall getsockname(long ptr ptr) +7 stdcall getsockopt(long long long ptr ptr) +8 stdcall htonl(long) +9 stdcall htons(long) +10 stdcall ioctlsocket(long long ptr) +11 stdcall inet_addr(str) +12 stdcall inet_ntoa(ptr) +13 stdcall listen(long long) +14 stdcall ntohl(long) +15 stdcall ntohs(long) +16 stdcall recv(long ptr long long) +17 stdcall recvfrom(long ptr long long ptr ptr) +18 stdcall select(long ptr ptr ptr ptr) +19 stdcall send(long ptr long long) +20 stdcall sendto(long ptr long long ptr long) +21 stdcall setsockopt(long long long ptr long) +22 stdcall shutdown(long long) +23 stdcall socket(long long long) +51 stdcall gethostbyaddr(ptr long long) +52 stdcall gethostbyname(str) +53 stdcall getprotobyname(str) +54 stdcall getprotobynumber(long) +55 stdcall getservbyname(str str) +56 stdcall getservbyport(long str) +57 stdcall gethostname(ptr long) 101 stdcall WSAAsyncSelect(long long long long) 102 stdcall WSAAsyncGetHostByAddr(long long ptr long long ptr long) @@ -50,7 +50,7 @@ 500 stub WEP -@ stdcall GetAddrInfoW(wstr wstr ptr ptr) +# @ stdcall GetAddrInfoW(wstr wstr ptr ptr) @ stdcall WSApSetPostRoutine(ptr) @ stdcall WPUCompleteOverlappedRequest(long ptr long long ptr) @ stdcall WSAAccept(long ptr ptr ptr long) @@ -114,6 +114,6 @@ @ stub WSCUpdateProvider @ stub WSCWriteNameSpaceOrder @ stdcall WSCWriteProviderOrder(ptr long) -@ stdcall freeaddrinfo(ptr) WS_freeaddrinfo -@ stdcall getaddrinfo(str str ptr ptr) WS_getaddrinfo -@ stdcall getnameinfo(ptr long ptr long ptr long long) WS_getnameinfo +@ stdcall freeaddrinfo(ptr) +@ stdcall getaddrinfo(str str ptr ptr) +@ stdcall getnameinfo(ptr long ptr long ptr long long)
16 years, 3 months
1
0
0
0
[tkreuzer] 35776: Fix user32 spec file
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 29 19:14:36 2008 New Revision: 35776 URL:
http://svn.reactos.org/svn/reactos?rev=35776&view=rev
Log: Fix user32 spec file Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.spec Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.spec [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/user32.spec [iso-8859-1] Fri Aug 29 19:14:36 2008 @@ -614,7 +614,7 @@ @ stub SetCursorContents @ stdcall SetCursorPos(long long) @ stdcall SetDebugErrorLevel(long) -@ stdcall SetDeskWallPaper(ptr) +@ stdcall SetDeskWallpaper(ptr) # @ stub SetDesktopBitmap @ stdcall SetDlgItemInt(long long long long) @ stdcall SetDlgItemTextA(long long str) @@ -680,7 +680,7 @@ @ stdcall SetWindowsHookExA(long long long long) @ stdcall SetWindowsHookExW(long long long long) @ stdcall SetWindowsHookW(long ptr) -@ stdcall ShowCaret(long) +@ stdcall ShowCaret(long) NtUserShowCaret @ stdcall ShowCursor(long) @ stdcall ShowOwnedPopups(long long) @ stdcall ShowScrollBar(long long long) @@ -712,17 +712,17 @@ @ stdcall TranslateMDISysAccel(long ptr) @ stdcall TranslateMessage(ptr) # @ stub TranslateMessageEx -@ stdcall UnhookWinEvent(long) +@ stdcall UnhookWinEvent(long) NtUserUnhookWinEvent @ stdcall UnhookWindowsHook(long ptr) -@ stdcall UnhookWindowsHookEx(long) +@ stdcall UnhookWindowsHookEx(long) NtUserUnhookWindowsHookEx @ stdcall UnionRect(ptr ptr ptr) -@ stdcall UnloadKeyboardLayout(long) +@ stdcall UnloadKeyboardLayout(long) NtUserUnloadKeyboardLayout @ stub UnlockWindowStation @ stdcall UnpackDDElParam(long long ptr ptr) @ stdcall UnregisterClassA(str long) @ stdcall UnregisterClassW(wstr long) @ stdcall UnregisterDeviceNotification(long) -@ stdcall UnregisterHotKey(long long) +@ stdcall UnregisterHotKey(long long) NtUserUnregisterHotKey # @ stub UnregisterMessagePumpHook # @ stub UnregisterUserApiHook @ stdcall UpdateLayeredWindow(long long ptr ptr long ptr long ptr long) @@ -737,7 +737,7 @@ @ stdcall UserRealizePalette(long) @ stub UserRegisterWowHandlers # @ stub UserSetDeviceHoldState -@ stdcall UserSignalProc(long long long long) +# @ stdcall UserSignalProc(long long long long) # @ stub VRipOutput # @ stub VTagOutput @ stdcall ValidateRect(long ptr)
16 years, 3 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
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