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
2025
January
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
February 2009
----- 2025 -----
January 2025
----- 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
29 participants
559 discussions
Start a n
N
ew thread
[tkreuzer] 39540: Fix a copy paste error
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Feb 10 16:06:36 2009 New Revision: 39540 URL:
http://svn.reactos.org/svn/reactos?rev=39540&view=rev
Log: Fix a copy paste error Modified: trunk/reactos/include/ddk/winddk.h Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Tue Feb 10 16:06:36 2009 @@ -10489,7 +10489,7 @@ PHYSICAL_ADDRESS NTAPI IoMapTransfer( - IN PDMA_ADAPTER DmaAdapter, + IN PADAPTER_OBJECT AdapterObject, IN PMDL Mdl, IN PVOID MapRegisterBase, IN PVOID CurrentVa,
15 years, 10 months
1
0
0
0
[tkreuzer] 39539: Move the declarations from winnt4.h, win2k.h and winxp.h into wdm.h or winddk and remove them. This wasn't in a good shape anyway, winxp.h was empty. Implement a bunch of inline functions in wdm.h
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Feb 10 15:57:25 2009 New Revision: 39539 URL:
http://svn.reactos.org/svn/reactos?rev=39539&view=rev
Log: Move the declarations from winnt4.h, win2k.h and winxp.h into wdm.h or winddk and remove them. This wasn't in a good shape anyway, winxp.h was empty. Implement a bunch of inline functions in wdm.h Removed: trunk/reactos/include/ddk/win2k.h trunk/reactos/include/ddk/winnt4.h trunk/reactos/include/ddk/winxp.h Modified: trunk/reactos/include/ddk/ntddk.h trunk/reactos/include/ddk/wdm.h trunk/reactos/include/ddk/winddk.h Modified: trunk/reactos/include/ddk/ntddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddk.h?rev=39…
============================================================================== --- trunk/reactos/include/ddk/ntddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntddk.h [iso-8859-1] Tue Feb 10 15:57:25 2009 @@ -50,17 +50,8 @@ typedef GUID UUID; - /* Windows Device Driver Kit */ #include "winddk.h" -/* Definitions only in Windows XP */ -#include "winxp.h" - -/* Definitions only in Windows 2000 */ -#include "win2k.h" - -/* Definitions only in Windows NT 4 */ -#include "winnt4.h" #endif /* _NTDDK_ */ Modified: trunk/reactos/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=3953…
============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Tue Feb 10 15:57:25 2009 @@ -822,6 +822,52 @@ #define QUOTA_LIMITS_HARDWS_MAX_DISABLE 0x00000008 #define QUOTA_LIMITS_USE_DEFAULT_LIMITS 0x00000010 + +/****************************************************************************** + * WINBASE Functions * + ******************************************************************************/ +#if !defined(_WINBASE_) + +#if defined(_WIN64) + +#define InterlockedPopEntrySList(Head) \ + ExpInterlockedPopEntrySList(Head) + +#define InterlockedPushEntrySList(Head, Entry) \ + ExpInterlockedPushEntrySList(Head, Entry) + +#define InterlockedFlushSList(Head) \ + ExpInterlockedFlushSList(Head) + +#define QueryDepthSList(Head) \ + ExQueryDepthSList(Head) + +#else // !defined(_WIN64) + +NTKERNELAPI +PSLIST_ENTRY +FASTCALL +InterlockedPopEntrySList( + IN PSLIST_HEADER ListHead); + +NTKERNELAPI +PSLIST_ENTRY +FASTCALL +InterlockedPushEntrySList( + IN PSLIST_HEADER ListHead, + IN PSLIST_ENTRY ListEntry); + +#define InterlockedFlushSList(ListHead) \ + ExInterlockedFlushSList(ListHead) + +#define QueryDepthSList(Head) \ + ExQueryDepthSList(Head) + +#endif // !defined(_WIN64) + +#endif // !defined(_WINBASE_) + + /****************************************************************************** * Kernel Types * ******************************************************************************/ @@ -1176,6 +1222,33 @@ IN CONST UNICODE_STRING *String2, IN BOOLEAN CaseInSensitive); +#if !defined(_AMD64_) && !defined(_IA64_) +NTSYSAPI +LARGE_INTEGER +NTAPI +RtlExtendedIntegerMultiply( + IN LARGE_INTEGER Multiplicand, + IN LONG Multiplier); + +NTSYSAPI +LARGE_INTEGER +NTAPI +RtlExtendedLargeIntegerDivide( + IN LARGE_INTEGER Dividend, + IN ULONG Divisor, + IN OUT PULONG Remainder); +#endif + +#if defined(_X86_) || defined(_IA64_) +NTSYSAPI +LARGE_INTEGER +NTAPI +RtlExtendedMagicDivide( + IN LARGE_INTEGER Dividend, + IN LARGE_INTEGER MagicDivisor, + IN CCHAR ShiftCount); +#endif + NTSYSAPI VOID NTAPI @@ -1681,9 +1754,9 @@ NTAPI_INLINE RtlConvertLongToLargeInteger(LONG SignedInteger) { - LARGE_INTEGER Result; - Result.QuadPart = SignedInteger; - return Result; + LARGE_INTEGER ret; + ret.QuadPart = SignedInteger; + return ret; } //DECLSPEC_DEPRECATED_DDK_WINXP @@ -1698,6 +1771,46 @@ return ret; } +//DECLSPEC_DEPRECATED_DDK +static __inline +ULONG +NTAPI_INLINE +RtlEnlargedUnsignedDivide( + IN ULARGE_INTEGER Dividend, + IN ULONG Divisor, + IN OUT PULONG Remainder) +{ + if (Remainder) + *Remainder = Dividend.QuadPart % Divisor; + return Dividend.QuadPart / Divisor; +} + +//DECLSPEC_DEPRECATED_DDK +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlEnlargedUnsignedMultiply( + IN ULONG Multiplicand, + IN ULONG Multiplier) +{ + LARGE_INTEGER ret; + ret.QuadPart = (ULONGLONG)Multiplicand * (ULONGLONG)Multiplier; + return ret; +} + +//DECLSPEC_DEPRECATED_DDK +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlEnlargedIntegerMultiply( + IN LONG Multiplicand, + IN LONG Multiplier) +{ + LARGE_INTEGER ret; + ret.QuadPart = (LONGLONG)Multiplicand * (ULONGLONG)Multiplier; + return ret; +} + FORCEINLINE VOID RtlInitEmptyAnsiString(OUT PANSI_STRING AnsiString, @@ -1721,7 +1834,7 @@ UnicodeString->Buffer = Buffer; } -#ifdef _M_AMD64 +#if defined(_AMD64_) || defined(_IA64_) static __inline LARGE_INTEGER NTAPI_INLINE @@ -1749,6 +1862,71 @@ return ret; } #endif + +#if defined(_AMD64_) +//DECLSPEC_DEPRECATED_DDK +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlExtendedMagicDivide( + IN LARGE_INTEGER Dividend, + IN LARGE_INTEGER MagicDivisor, + IN CCHAR ShiftCount); +{ + LARGE_INTEGER ret; + ULONG64 ret64; + BOOLEAN Pos; + Pos = (Dividend.QuadPart >= 0); + ret64 = UnsignedMultiplyHigh(Pos ? Dividend.QuadPart : -Dividend.QuadPart + MagicDivisor.QuadPart); + ret64 >>= ShiftCount; + ret.QuadPart = Pos ? ret64 : -ret64; + return ret; +} +#endif + +//DECLSPEC_DEPRECATED_DDK +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlLargeIntegerAdd( + IN LARGE_INTEGER Addend1, + IN LARGE_INTEGER Addend2) +{ + LARGE_INTEGER ret; + ret.QuadPart = Addend1.QuadPart + Addend2.QuadPart; + return ret; +} + +/* VOID + * RtlLargeIntegerAnd( + * IN OUT LARGE_INTEGER Result, + * IN LARGE_INTEGER Source, + * IN LARGE_INTEGER Mask); + */ +#define RtlLargeIntegerAnd(Result, Source, Mask) \ + Result.QuadPart = Source.QuadPart & Mask.QuadPart + +//DECLSPEC_DEPRECATED_DDK +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlLargeIntegerArithmeticShift( + IN LARGE_INTEGER LargeInteger, + IN CCHAR ShiftCount) +{ + LARGE_INTEGER ret; + ret.QuadPart = LargeInteger.QuadPart >> ShiftCount; + return ret; +} + +/* BOOLEAN + * RtlLargeIntegerEqualTo( + * IN LARGE_INTEGER Operand1, + * IN LARGE_INTEGER Operand2); + */ +#define RtlLargeIntegerEqualTo(X,Y) \ + (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart))) FORCEINLINE PVOID @@ -1787,26 +1965,164 @@ // // Byte Swap Functions // -#if (defined(_M_IX86) && (_MSC_FULL_VER > 13009037)) || \ - ((defined(_M_AMD64) || \ - defined(_M_IA64)) && (_MSC_FULL_VER > 13009175)) - -unsigned short __cdecl _byteswap_ushort(unsigned short); -unsigned long __cdecl _byteswap_ulong (unsigned long); -unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64); -#pragma intrinsic(_byteswap_ushort) -#pragma intrinsic(_byteswap_ulong) -#pragma intrinsic(_byteswap_uint64) +#if (defined(_M_IX86) && (_MSC_FULL_VER > 13009037 || defined(__GNUC__))) || \ + ((defined(_M_AMD64) || defined(_M_IA64)) \ + && (_MSC_FULL_VER > 13009175 || defined(__GNUC__))) + #define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x)) #define RtlUlongByteSwap(_x) _byteswap_ulong((_x)) #define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x)) -#elif defined(__GNUC__) && (defined(_M_IX86) || defined(_M_AMD64)) - -#define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x)) -#define RtlUlongByteSwap(_x) _byteswap_ulong((_x)) -#define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x)) - +#endif + +/****************************************************************************** + * Memory manager Types * + ******************************************************************************/ + +typedef struct _MDL { + struct _MDL *Next; + CSHORT Size; + CSHORT MdlFlags; + struct _EPROCESS *Process; + PVOID MappedSystemVa; + PVOID StartVa; + ULONG ByteCount; + ULONG ByteOffset; +} MDL, *PMDL; + + +/****************************************************************************** + * Memory manager Functions * + ******************************************************************************/ + +/* PVOID MmGetSystemAddressForMdl( + * IN PMDL Mdl); + */ +#define MmGetSystemAddressForMdl(Mdl) \ + (((Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \ + MDL_SOURCE_IS_NONPAGED_POOL)) ? \ + ((Mdl)->MappedSystemVa) : \ + (MmMapLockedPages((Mdl), KernelMode))) + +/* PVOID + * MmGetSystemAddressForMdlSafe( + * IN PMDL Mdl, + * IN MM_PAGE_PRIORITY Priority) + */ +#define MmGetSystemAddressForMdlSafe(_Mdl, _Priority) \ + (((_Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA \ + | MDL_SOURCE_IS_NONPAGED_POOL)) ? \ + (_Mdl)->MappedSystemVa : \ + (PVOID) MmMapLockedPagesSpecifyCache((_Mdl), \ + KernelMode, MmCached, NULL, FALSE, (_Priority))) + +#if (NTDDI_VERSION >= NTDDI_WIN2K) +NTKERNELAPI +PMDL +NTAPI +MmCreateMdl( + IN PMDL MemoryDescriptorList OPTIONAL, + IN PVOID Base, + IN SIZE_T Length); + +#endif + + +/****************************************************************************** + * I/O Manager Functions * + ******************************************************************************/ + +#if defined(USE_DMA_MACROS) && !defined(_NTHAL_) && \ + (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_) + +#define DMA_MACROS_DEFINED + +FORCEINLINE +NTSTATUS +IoAllocateAdapterChannel( + IN PADAPTER_OBJECT AdapterObject, + IN PDEVICE_OBJECT DeviceObject, + IN ULONG NumberOfMapRegisters, + IN PDRIVER_CONTROL ExecutionRoutine, + IN PVOID Context) +{ + PALLOCATE_ADAPTER_CHANNEL AllocateAdapterChannel; + AllocateAdapterChannel = + *(DmaAdapter)->DmaOperations->AllocateAdapterChannel; + ASSERT(AllocateAdapterChannel); + return AllocateAdapterChannel(DmaAdapter, + DeviceObject, + NumberOfMapRegisters, + ExecutionRoutine, + Context ); +} + +FORCEINLINE +BOOLEAN +IoFlushAdapterBuffers( + IN PADAPTER_OBJECT AdapterObject, + IN PMDL Mdl, + IN PVOID MapRegisterBase, + IN PVOID CurrentVa, + IN ULONG Length, + IN BOOLEAN WriteToDevice) +{ + PFLUSH_ADAPTER_BUFFERS FlushAdapterBuffers; + FlushAdapterBuffers = *(DmaAdapter)->DmaOperations->FlushAdapterBuffers; + ASSERT(FlushAdapterBuffers); + return FlushAdapterBuffers(DmaAdapter, + Mdl, + MapRegisterBase, + CurrentVa, + Length, + WriteToDevice ); +} + +FORCEINLINE +VOID +IoFreeAdapterChannel( + IN PADAPTER_OBJECT AdapterObject) +{ + PFREE_ADAPTER_CHANNEL FreeAdapterChannel; + FreeAdapterChannel = *(DmaAdapter)->DmaOperations->FreeAdapterChannel; + ASSERT(FreeAdapterChannel); + FreeAdapterChannel(DmaAdapter); +} + +FORCEINLINE +VOID +IoFreeMapRegisters( + IN PADAPTER_OBJECT AdapterObject, + IN PVOID MapRegisterBase, + IN ULONG NumberOfMapRegisters) +{ + PFREE_MAP_REGISTERS FreeMapRegisters; + FreeMapRegisters = *(DmaAdapter)->DmaOperations->FreeMapRegisters; + ASSERT(FreeMapRegisters); + FreeMapRegisters(DmaAdapter, MapRegisterBase, NumberOfMapRegisters); +} + +FORCEINLINE +PHYSICAL_ADDRESS +IoMapTransfer( + IN PDMA_ADAPTER DmaAdapter, + IN PMDL Mdl, + IN PVOID MapRegisterBase, + IN PVOID CurrentVa, + IN OUT PULONG Length, + IN BOOLEAN WriteToDevice) +{ + PMAP_TRANSFER MapTransfer; + + MapTransfer = *(DmaAdapter)->DmaOperations->MapTransfer; + ASSERT(MapTransfer); + return MapTransfer(DmaAdapter, + Mdl, + MapRegisterBase, + CurrentVa, + Length, + WriteToDevice); +} #endif @@ -1997,6 +2313,23 @@ }; } EX_RUNDOWN_REF, *PEX_RUNDOWN_REF; +typedef enum _WORK_QUEUE_TYPE { + CriticalWorkQueue, + DelayedWorkQueue, + HyperCriticalWorkQueue, + MaximumWorkQueue +} WORK_QUEUE_TYPE; + +typedef VOID +(DDKAPI *PWORKER_THREAD_ROUTINE)( + IN PVOID Parameter); + +typedef struct _WORK_QUEUE_ITEM { + LIST_ENTRY List; + PWORKER_THREAD_ROUTINE WorkerRoutine; + volatile PVOID Parameter; +} WORK_QUEUE_ITEM, *PWORK_QUEUE_ITEM; + /****************************************************************************** * Executive Functions * @@ -2097,6 +2430,19 @@ #define ExReleaseResource(R) (ExReleaseResourceLite(R)) +/* VOID + * ExInitializeWorkItem( + * IN PWORK_QUEUE_ITEM Item, + * IN PWORKER_THREAD_ROUTINE Routine, + * IN PVOID Context) + */ +#define ExInitializeWorkItem(Item, Routine, Context) \ +{ \ + (Item)->WorkerRoutine = Routine; \ + (Item)->Parameter = Context; \ + (Item)->List.Flink = NULL; \ +} + #if (NTDDI_VERSION >= NTDDI_WIN2K) NTKERNELAPI @@ -2414,6 +2760,13 @@ IN PCALLBACK_OBJECT CallbackObject, IN PVOID Argument1, IN PVOID Argument2); + +NTKERNELAPI +VOID +NTAPI +ExQueueWorkItem( + IN PWORK_QUEUE_ITEM WorkItem, + IN WORK_QUEUE_TYPE QueueType); NTKERNELAPI DECLSPEC_NORETURN @@ -2572,49 +2925,73 @@ #endif -/****************************************************************************** - * WINBASE Functions * - ******************************************************************************/ -#if !defined(_WINBASE_) - -#if defined(_WIN64) - -#define InterlockedPopEntrySList(Head) \ - ExpInterlockedPopEntrySList(Head) - -#define InterlockedPushEntrySList(Head, Entry) \ - ExpInterlockedPushEntrySList(Head, Entry) - -#define InterlockedFlushSList(Head) \ - ExpInterlockedFlushSList(Head) - -#define QueryDepthSList(Head) \ - ExQueryDepthSList(Head) - -#else // !defined(_WIN64) - -NTKERNELAPI -PSLIST_ENTRY -FASTCALL -InterlockedPopEntrySList( - IN PSLIST_HEADER ListHead); - -NTKERNELAPI -PSLIST_ENTRY -FASTCALL -InterlockedPushEntrySList( - IN PSLIST_HEADER ListHead, - IN PSLIST_ENTRY ListEntry); - -#define InterlockedFlushSList(ListHead) \ - ExInterlockedFlushSList(ListHead) - -#define QueryDepthSList(Head) \ - ExQueryDepthSList(Head) - -#endif // !defined(_WIN64) - -#endif // !defined(_WINBASE_) +#if !defined(MIDL_PASS) + +static __inline PVOID +ExAllocateFromNPagedLookasideList( + IN PNPAGED_LOOKASIDE_LIST Lookaside) +{ + PVOID Entry; + + Lookaside->L.TotalAllocates++; + Entry = InterlockedPopEntrySList(&Lookaside->L.ListHead); + if (Entry == NULL) { + Lookaside->L.AllocateMisses++; + Entry = (Lookaside->L.Allocate)(Lookaside->L.Type, + Lookaside->L.Size, + Lookaside->L.Tag); + } + return Entry; +} + +static __inline PVOID +ExAllocateFromPagedLookasideList( + IN PPAGED_LOOKASIDE_LIST Lookaside) +{ + PVOID Entry; + + Lookaside->L.TotalAllocates++; + Entry = InterlockedPopEntrySList(&Lookaside->L.ListHead); + if (Entry == NULL) { + Lookaside->L.AllocateMisses++; + Entry = (Lookaside->L.Allocate)(Lookaside->L.Type, + Lookaside->L.Size, + Lookaside->L.Tag); + } + return Entry; +} + +static __inline VOID +ExFreeToNPagedLookasideList( + IN PNPAGED_LOOKASIDE_LIST Lookaside, + IN PVOID Entry) +{ + Lookaside->L.TotalFrees++; + if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) { + Lookaside->L.FreeMisses++; + (Lookaside->L.Free)(Entry); + } else { + InterlockedPushEntrySList(&Lookaside->L.ListHead, (PSLIST_ENTRY)Entry); + } +} + +static __inline VOID +ExFreeToPagedLookasideList( + IN PPAGED_LOOKASIDE_LIST Lookaside, + IN PVOID Entry) +{ + Lookaside->L.TotalFrees++; + if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) { + Lookaside->L.FreeMisses++; + (Lookaside->L.Free)(Entry); + } else { + InterlockedPushEntrySList(&Lookaside->L.ListHead, (PSLIST_ENTRY)Entry); + } +} + + +#endif // !defined(MIDL_PASS) + #ifdef __cplusplus } Removed: trunk/reactos/include/ddk/win2k.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/win2k.h?rev=39…
============================================================================== --- trunk/reactos/include/ddk/win2k.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/win2k.h (removed) @@ -1,100 +1,0 @@ -/* - * win2k.h - * - * Definitions only used in Windows 2000 and earlier versions - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Casper S. Hornstrup <chorns(a)users.sourceforge.net> - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __WIN2K_H -#define __WIN2K_H - -#ifdef __cplusplus -extern "C" { -#endif - -#pragma pack(push,4) - -typedef enum _BUS_DATA_TYPE { - ConfigurationSpaceUndefined = -1, - Cmos, - EisaConfiguration, - Pos, - CbusConfiguration, - PCIConfiguration, - VMEConfiguration, - NuBusConfiguration, - PCMCIAConfiguration, - MPIConfiguration, - MPSAConfiguration, - PNPISAConfiguration, - SgiInternalConfiguration, - MaximumBusDataType -} BUS_DATA_TYPE, *PBUS_DATA_TYPE; - -#pragma pack(pop) - -NTKERNELAPI -VOID -DDKAPI -ExReleaseResourceForThreadLite( - IN PERESOURCE Resource, - IN ERESOURCE_THREAD ResourceThreadId); - -NTKERNELAPI -NTSTATUS -FASTCALL -IoReadPartitionTable( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG SectorSize, - IN BOOLEAN ReturnRecognizedPartitions, - OUT struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer); - -NTKERNELAPI -NTSTATUS -FASTCALL -IoSetPartitionInformation( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG SectorSize, - IN ULONG PartitionNumber, - IN ULONG PartitionType); - -NTKERNELAPI -NTSTATUS -FASTCALL -IoWritePartitionTable( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG SectorSize, - IN ULONG SectorsPerTrack, - IN ULONG NumberOfHeads, - IN struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer); - -/* - * PVOID MmGetSystemAddressForMdl( - * IN PMDL Mdl); - */ -#define MmGetSystemAddressForMdl(Mdl) \ - (((Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \ - MDL_SOURCE_IS_NONPAGED_POOL)) ? \ - ((Mdl)->MappedSystemVa) : \ - (MmMapLockedPages((Mdl), KernelMode))) - -#ifdef __cplusplus -} -#endif - -#endif /* __WIN2K_H */ Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Tue Feb 10 15:57:25 2009 @@ -2298,17 +2298,6 @@ ULONG_PTR Reserved; SCATTER_GATHER_ELEMENT Elements[1]; } SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST; - -typedef struct _MDL { - struct _MDL *Next; - CSHORT Size; - CSHORT MdlFlags; - struct _EPROCESS *Process; - PVOID MappedSystemVa; - PVOID StartVa; - ULONG ByteCount; - ULONG ByteOffset; -} MDL, *PMDL; #define MDL_MAPPED_TO_SYSTEM_VA 0x0001 #define MDL_PAGES_LOCKED 0x0002 @@ -4579,23 +4568,6 @@ IoQueryDeviceMaxData } IO_QUERY_DEVICE_DATA_FORMAT, *PIO_QUERY_DEVICE_DATA_FORMAT; -typedef enum _WORK_QUEUE_TYPE { - CriticalWorkQueue, - DelayedWorkQueue, - HyperCriticalWorkQueue, - MaximumWorkQueue -} WORK_QUEUE_TYPE; - -typedef VOID -(DDKAPI *PWORKER_THREAD_ROUTINE)( - IN PVOID Parameter); - -typedef struct _WORK_QUEUE_ITEM { - LIST_ENTRY List; - PWORKER_THREAD_ROUTINE WorkerRoutine; - volatile PVOID Parameter; -} WORK_QUEUE_ITEM, *PWORK_QUEUE_ITEM; - typedef enum _KBUGCHECK_CALLBACK_REASON { KbCallbackInvalid, KbCallbackReserved1, @@ -4746,6 +4718,25 @@ IN PUNICODE_STRING FullImageName, IN HANDLE ProcessId, IN PIMAGE_INFO ImageInfo); + +#pragma pack(push,4) +typedef enum _BUS_DATA_TYPE { + ConfigurationSpaceUndefined = -1, + Cmos, + EisaConfiguration, + Pos, + CbusConfiguration, + PCIConfiguration, + VMEConfiguration, + NuBusConfiguration, + PCMCIAConfiguration, + MPIConfiguration, + MPSAConfiguration, + PNPISAConfiguration, + SgiInternalConfiguration, + MaximumBusDataType +} BUS_DATA_TYPE, *PBUS_DATA_TYPE; +#pragma pack(pop) typedef struct _NT_TIB { struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; @@ -6281,68 +6272,6 @@ KeInitializeEvent(&(_FastMutex)->Gate, SynchronizationEvent, FALSE); \ } -/** Executive support routines **/ - -static __inline PVOID -ExAllocateFromNPagedLookasideList( - IN PNPAGED_LOOKASIDE_LIST Lookaside) -{ - PVOID Entry; - - Lookaside->L.TotalAllocates++; - Entry = InterlockedPopEntrySList(&Lookaside->L.ListHead); - if (Entry == NULL) { - Lookaside->L.AllocateMisses++; - Entry = (Lookaside->L.Allocate)(Lookaside->L.Type, Lookaside->L.Size, Lookaside->L.Tag); - } - return Entry; -} - -static __inline PVOID -ExAllocateFromPagedLookasideList( - IN PPAGED_LOOKASIDE_LIST Lookaside) -{ - PVOID Entry; - - Lookaside->L.TotalAllocates++; - Entry = InterlockedPopEntrySList(&Lookaside->L.ListHead); - if (Entry == NULL) { - Lookaside->L.AllocateMisses++; - Entry = (Lookaside->L.Allocate)(Lookaside->L.Type, Lookaside->L.Size, Lookaside->L.Tag); - } - return Entry; -} - -#define PROTECTED_POOL 0x80000000 - -static __inline VOID -ExFreeToNPagedLookasideList( - IN PNPAGED_LOOKASIDE_LIST Lookaside, - IN PVOID Entry) -{ - Lookaside->L.TotalFrees++; - if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) { - Lookaside->L.FreeMisses++; - (Lookaside->L.Free)(Entry); - } else { - InterlockedPushEntrySList(&Lookaside->L.ListHead, (PSLIST_ENTRY)Entry); - } -} - -static __inline VOID -ExFreeToPagedLookasideList( - IN PPAGED_LOOKASIDE_LIST Lookaside, - IN PVOID Entry) -{ - Lookaside->L.TotalFrees++; - if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) { - Lookaside->L.FreeMisses++; - (Lookaside->L.Free)(Entry); - } else { - InterlockedPushEntrySList(&Lookaside->L.ListHead, (PSLIST_ENTRY)Entry); - } -} - NTKERNELAPI VOID NTAPI @@ -6350,6 +6279,91 @@ IN PRKEVENT Event, IN EVENT_TYPE Type, IN BOOLEAN State); + +/****************************************************************************** + * Executive Types * + ******************************************************************************/ + +typedef struct _ZONE_SEGMENT_HEADER { + SINGLE_LIST_ENTRY SegmentList; + PVOID Reserved; +} ZONE_SEGMENT_HEADER, *PZONE_SEGMENT_HEADER; + +typedef struct _ZONE_HEADER { + SINGLE_LIST_ENTRY FreeList; + SINGLE_LIST_ENTRY SegmentList; + ULONG BlockSize; + ULONG TotalSegmentSize; +} ZONE_HEADER, *PZONE_HEADER; + +#define PROTECTED_POOL 0x80000000 + +/****************************************************************************** + * Executive Functions * + ******************************************************************************/ + +NTKERNELAPI +NTSTATUS +NTAPI +ExExtendZone( + IN PZONE_HEADER Zone, + IN PVOID Segment, + IN ULONG SegmentSize); + +static __inline PVOID +ExAllocateFromZone( + IN PZONE_HEADER Zone) +{ + if (Zone->FreeList.Next) + Zone->FreeList.Next = Zone->FreeList.Next->Next; + return (PVOID) Zone->FreeList.Next; +} + +static __inline PVOID +ExFreeToZone( + IN PZONE_HEADER Zone, + IN PVOID Block) +{ + ((PSINGLE_LIST_ENTRY) Block)->Next = Zone->FreeList.Next; + Zone->FreeList.Next = ((PSINGLE_LIST_ENTRY) Block); + return ((PSINGLE_LIST_ENTRY) Block)->Next; +} + +NTKERNELAPI +NTSTATUS +NTAPI +ExInitializeZone( + IN PZONE_HEADER Zone, + IN ULONG BlockSize, + IN PVOID InitialSegment, + IN ULONG InitialSegmentSize); + +/* + * PVOID + * ExInterlockedAllocateFromZone( + * IN PZONE_HEADER Zone, + * IN PKSPIN_LOCK Lock) + */ +#define ExInterlockedAllocateFromZone(Zone, Lock) \ + ((PVOID) ExInterlockedPopEntryList(&Zone->FreeList, Lock)) + +NTKERNELAPI +NTSTATUS +NTAPI +ExInterlockedExtendZone( + IN PZONE_HEADER Zone, + IN PVOID Segment, + IN ULONG SegmentSize, + IN PKSPIN_LOCK Lock); + +/* PVOID + * ExInterlockedFreeToZone( + * IN PZONE_HEADER Zone, + * IN PVOID Block, + * IN PKSPIN_LOCK Lock); + */ +#define ExInterlockedFreeToZone(Zone, Block, Lock) \ + ExInterlockedPushEntryList(&(Zone)->FreeList, (PSINGLE_LIST_ENTRY)(Block), Lock) /* * VOID @@ -6361,6 +6375,24 @@ #define ExInitializeSListHead InitializeSListHead +/* + * BOOLEAN + * ExIsFullZone( + * IN PZONE_HEADER Zone) + */ +#define ExIsFullZone(Zone) \ + ((Zone)->FreeList.Next == (PSINGLE_LIST_ENTRY) NULL) + +/* BOOLEAN + * ExIsObjectInFirstZoneSegment( + * IN PZONE_HEADER Zone, + * IN PVOID Object); + */ +#define ExIsObjectInFirstZoneSegment(Zone,Object) \ + ((BOOLEAN)( ((PUCHAR)(Object) >= (PUCHAR)(Zone)->SegmentList.Next) && \ + ((PUCHAR)(Object) < (PUCHAR)(Zone)->SegmentList.Next + \ + (Zone)->TotalSegmentSize)) ) + NTKERNELAPI DECLSPEC_NORETURN VOID @@ -6380,6 +6412,17 @@ NTAPI ExUuidCreate( OUT UUID *Uuid); + +#define ExAcquireResourceExclusive ExAcquireResourceExclusiveLite +#define ExAcquireResourceShared ExAcquireResourceSharedLite +#define ExConvertExclusiveToShared ExConvertExclusiveToSharedLite +#define ExDeleteResource ExDeleteResourceLite +#define ExInitializeResource ExInitializeResourceLite +#define ExIsResourceAcquiredExclusive ExIsResourceAcquiredExclusiveLite +#define ExIsResourceAcquiredShared ExIsResourceAcquiredSharedLite +#define ExIsResourceAcquired ExIsResourceAcquiredSharedLite +#define ExReleaseResourceForThread ExReleaseResourceForThreadLite + #ifdef DBG @@ -6465,16 +6508,6 @@ PADAPTER_OBJECT AdapterObject ); -NTKERNELAPI -NTSTATUS -NTAPI -IoAllocateAdapterChannel( - IN PADAPTER_OBJECT AdapterObject, - IN PDEVICE_OBJECT DeviceObject, - IN ULONG NumberOfMapRegisters, - IN PDRIVER_CONTROL ExecutionRoutine, - IN PVOID Context -); /** Io access routines **/ @@ -6938,6 +6971,18 @@ } \ } +#ifndef DMA_MACROS_DEFINED +NTKERNELAPI +NTSTATUS +NTAPI +IoAllocateAdapterChannel( + IN PADAPTER_OBJECT AdapterObject, + IN PDEVICE_OBJECT DeviceObject, + IN ULONG NumberOfMapRegisters, + IN PDRIVER_CONTROL ExecutionRoutine, + IN PVOID Context); +#endif + NTKERNELAPI VOID NTAPI @@ -7654,6 +7699,15 @@ IN PDEVICE_OBJECT DeviceObject, IN ULONG BytesPerSector, OUT PDISK_SIGNATURE Signature); + +NTKERNELAPI +NTSTATUS +FASTCALL +IoReadPartitionTable( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN BOOLEAN ReturnRecognizedPartitions, + OUT struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer); NTKERNELAPI NTSTATUS @@ -7919,6 +7973,15 @@ NTKERNELAPI NTSTATUS +FASTCALL +IoSetPartitionInformation( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN ULONG PartitionNumber, + IN ULONG PartitionType); + +NTKERNELAPI +NTSTATUS NTAPI IoSetPartitionInformationEx( IN PDEVICE_OBJECT DeviceObject, @@ -8186,6 +8249,16 @@ NTKERNELAPI NTSTATUS +FASTCALL +IoWritePartitionTable( + IN PDEVICE_OBJECT DeviceObject, + IN ULONG SectorSize, + IN ULONG SectorsPerTrack, + IN ULONG NumberOfHeads, + IN struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer); + +NTKERNELAPI +NTSTATUS NTAPI IoWritePartitionTableEx( IN PDEVICE_OBJECT DeviceObject, @@ -9075,19 +9148,6 @@ MmMarkPhysicalMemoryAsGood( IN PPHYSICAL_ADDRESS StartAddress, IN OUT PLARGE_INTEGER NumberOfBytes); - -/* - * PVOID - * MmGetSystemAddressForMdlSafe( - * IN PMDL Mdl, - * IN MM_PAGE_PRIORITY Priority) - */ -#define MmGetSystemAddressForMdlSafe(_Mdl, _Priority) \ - (((_Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA \ - | MDL_SOURCE_IS_NONPAGED_POOL)) ? \ - (_Mdl)->MappedSystemVa : \ - (PVOID) MmMapLockedPagesSpecifyCache((_Mdl), \ - KernelMode, MmCached, NULL, FALSE, (_Priority))) NTKERNELAPI PVOID @@ -10390,6 +10450,398 @@ #endif +/** Stuff from winnt4.h */ + +#ifndef DMA_MACROS_DEFINED + +#if (NTDDI_VERSION >= NTDDI_WIN2K) + +//DECLSPEC_DEPRECATED_DDK +NTKERNELAPI +BOOLEAN +NTAPI +IoFlushAdapterBuffers( + IN PADAPTER_OBJECT AdapterObject, + IN PMDL Mdl, + IN PVOID MapRegisterBase, + IN PVOID CurrentVa, + IN ULONG Length, + IN BOOLEAN WriteToDevice); + +//DECLSPEC_DEPRECATED_DDK +NTKERNELAPI +VOID +NTAPI +IoFreeAdapterChannel( + IN PADAPTER_OBJECT AdapterObject); + +//DECLSPEC_DEPRECATED_DDK +NTKERNELAPI +VOID +NTAPI +IoFreeMapRegisters( + IN PADAPTER_OBJECT AdapterObject, + IN PVOID MapRegisterBase, + IN ULONG NumberOfMapRegisters); + +//DECLSPEC_DEPRECATED_DDK +NTKERNELAPI +PHYSICAL_ADDRESS +NTAPI +IoMapTransfer( + IN PDMA_ADAPTER DmaAdapter, + IN PMDL Mdl, + IN PVOID MapRegisterBase, + IN PVOID CurrentVa, + IN OUT PULONG Length, + IN BOOLEAN WriteToDevice); + + +#endif // (NTDDI_VERSION >= NTDDI_WIN2K) +#endif // !defined(DMA_MACROS_DEFINED) + +NTKERNELAPI +NTSTATUS +NTAPI +IoAssignResources( + IN PUNICODE_STRING RegistryPath, + IN PUNICODE_STRING DriverClassName OPTIONAL, + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT DeviceObject OPTIONAL, + IN PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources, + IN OUT PCM_RESOURCE_LIST *AllocatedResources); + +NTKERNELAPI +NTSTATUS +NTAPI +IoAttachDeviceByPointer( + IN PDEVICE_OBJECT SourceDevice, + IN PDEVICE_OBJECT TargetDevice); + +NTKERNELAPI +BOOLEAN +NTAPI +MmIsNonPagedSystemAddressValid( + IN PVOID VirtualAddress); + +#if defined(_AMD64_) || defined(_IA64_) +//DECLSPEC_DEPRECATED_DDK_WINXP +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlLargeIntegerDivide( + IN LARGE_INTEGER Dividend, + IN LARGE_INTEGER Divisor, + IN OUT PLARGE_INTEGER Remainder) +{ + LARGE_INTEGER ret; + ret.QuadPart = Dividend.QuadPart / Divisor.QuadPart; + if (Remainder) + Remainder->QuadPart = Dividend.QuadPart % Divisor.QuadPart; + return ret; +} +#else +NTSYSAPI +LARGE_INTEGER +NTAPI +RtlLargeIntegerDivide( + IN LARGE_INTEGER Dividend, + IN LARGE_INTEGER Divisor, + IN OUT PLARGE_INTEGER Remainder); +#endif + +NTKERNELAPI +INTERLOCKED_RESULT +NTAPI +ExInterlockedDecrementLong( + IN PLONG Addend, + IN PKSPIN_LOCK Lock); + +NTKERNELAPI +ULONG +NTAPI +ExInterlockedExchangeUlong( + IN PULONG Target, + IN ULONG Value, + IN PKSPIN_LOCK Lock); + +NTKERNELAPI +INTERLOCKED_RESULT +NTAPI +ExInterlockedIncrementLong( + IN PLONG Addend, + IN PKSPIN_LOCK Lock); + +NTHALAPI +VOID +NTAPI +HalAcquireDisplayOwnership( + IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters); + +NTHALAPI +NTSTATUS +NTAPI +HalAllocateAdapterChannel( + IN PADAPTER_OBJECT AdapterObject, + IN PWAIT_CONTEXT_BLOCK Wcb, + IN ULONG NumberOfMapRegisters, + IN PDRIVER_CONTROL ExecutionRoutine); + +NTHALAPI +PVOID +NTAPI +HalAllocateCommonBuffer( + IN PADAPTER_OBJECT AdapterObject, + IN ULONG Length, + OUT PPHYSICAL_ADDRESS LogicalAddress, + IN BOOLEAN CacheEnabled); + +NTHALAPI +NTSTATUS +NTAPI +HalAssignSlotResources( + IN PUNICODE_STRING RegistryPath, + IN PUNICODE_STRING DriverClassName, + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT DeviceObject, + IN INTERFACE_TYPE BusType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN OUT PCM_RESOURCE_LIST *AllocatedResources); + +NTHALAPI +VOID +NTAPI +HalFreeCommonBuffer( + IN PADAPTER_OBJECT AdapterObject, + IN ULONG Length, + IN PHYSICAL_ADDRESS LogicalAddress, + IN PVOID VirtualAddress, + IN BOOLEAN CacheEnabled); + +NTHALAPI +PADAPTER_OBJECT +NTAPI +HalGetAdapter( + IN PDEVICE_DESCRIPTION DeviceDescription, + IN OUT PULONG NumberOfMapRegisters); + +NTHALAPI +ULONG +NTAPI +HalGetBusData( + IN BUS_DATA_TYPE BusDataType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN PVOID Buffer, + IN ULONG Length); + +NTHALAPI +ULONG +NTAPI +HalGetBusDataByOffset( + IN BUS_DATA_TYPE BusDataType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN PVOID Buffer, + IN ULONG Offset, + IN ULONG Length); + +NTHALAPI +ULONG +NTAPI +HalGetDmaAlignmentRequirement( + VOID); + +NTHALAPI +ULONG +NTAPI +HalGetInterruptVector( + IN INTERFACE_TYPE InterfaceType, + IN ULONG BusNumber, + IN ULONG BusInterruptLevel, + IN ULONG BusInterruptVector, + OUT PKIRQL Irql, + OUT PKAFFINITY Affinity); + +NTHALAPI +ULONG +NTAPI +HalReadDmaCounter( + IN PADAPTER_OBJECT AdapterObject); + +NTHALAPI +ULONG +NTAPI +HalSetBusData( + IN BUS_DATA_TYPE BusDataType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN PVOID Buffer, + IN ULONG Length); + +NTHALAPI +ULONG +NTAPI +HalSetBusDataByOffset( + IN BUS_DATA_TYPE BusDataType, + IN ULONG BusNumber, + IN ULONG SlotNumber, + IN PVOID Buffer, + IN ULONG Offset, + IN ULONG Length); + +NTHALAPI +BOOLEAN +NTAPI +HalTranslateBusAddress( + IN INTERFACE_TYPE InterfaceType, + IN ULONG BusNumber, + IN PHYSICAL_ADDRESS BusAddress, + IN OUT PULONG AddressSpace, + OUT PPHYSICAL_ADDRESS TranslatedAddress); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerEqualToZero( + IN LARGE_INTEGER Operand); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerGreaterOrEqualToZero( + IN LARGE_INTEGER Operand); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerGreaterThan( + IN LARGE_INTEGER Operand1, + IN LARGE_INTEGER Operand2); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerGreaterThanOrEqualTo( + IN LARGE_INTEGER Operand1, + IN LARGE_INTEGER Operand2); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerGreaterThanZero( + IN LARGE_INTEGER Operand); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerLessOrEqualToZero( + IN LARGE_INTEGER Operand); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerLessThan( + IN LARGE_INTEGER Operand1, + IN LARGE_INTEGER Operand2); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerLessThanOrEqualTo( + IN LARGE_INTEGER Operand1, + IN LARGE_INTEGER Operand2); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerLessThanZero( + IN LARGE_INTEGER Operand); + +NTSYSAPI +LARGE_INTEGER +NTAPI +RtlLargeIntegerNegate( + IN LARGE_INTEGER Subtrahend); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerNotEqualTo( + IN LARGE_INTEGER Operand1, + IN LARGE_INTEGER Operand2); + +NTSYSAPI +BOOLEAN +NTAPI +RtlLargeIntegerNotEqualToZero( + IN LARGE_INTEGER Operand); + +NTSYSAPI +LARGE_INTEGER +NTAPI +RtlLargeIntegerShiftLeft( + IN LARGE_INTEGER LargeInteger, + IN CCHAR ShiftCount); + +NTSYSAPI +LARGE_INTEGER +NTAPI +RtlLargeIntegerShiftRight( + IN LARGE_INTEGER LargeInteger, + IN CCHAR ShiftCount); + +NTSYSAPI +LARGE_INTEGER +NTAPI +RtlLargeIntegerSubtract( + IN LARGE_INTEGER Minuend, + IN LARGE_INTEGER Subtrahend); + + +/* + * ULONG + * COMPUTE_PAGES_SPANNED( + * IN PVOID Va, + * IN ULONG Size) + */ +#define COMPUTE_PAGES_SPANNED(Va, \ + Size) \ + (ADDRESS_AND_SIZE_TO_SPAN_PAGES(Va, Size)) + + +/* +** Architecture specific structures +*/ + +#ifdef _X86_ + +NTKERNELAPI +INTERLOCKED_RESULT +FASTCALL +Exfi386InterlockedIncrementLong( + IN PLONG Addend); + +NTKERNELAPI +INTERLOCKED_RESULT +FASTCALL +Exfi386InterlockedDecrementLong( + IN PLONG Addend); + +NTKERNELAPI +ULONG +FASTCALL +Exfi386InterlockedExchangeUlong( + IN PULONG Target, + IN ULONG Value); + +#define ExInterlockedIncrementLong(Addend,Lock) Exfi386InterlockedIncrementLong(Addend) +#define ExInterlockedDecrementLong(Addend,Lock) Exfi386InterlockedDecrementLong(Addend) +#define ExInterlockedExchangeUlong(Target, Value, Lock) Exfi386InterlockedExchangeUlong(Target, Value) + +#endif /* _X86_ */ + #ifdef __cplusplus } #endif Removed: trunk/reactos/include/ddk/winnt4.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winnt4.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winnt4.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winnt4.h (removed) @@ -1,611 +1,0 @@ -/* - * winnt4.h - * - * Definitions only used in Windows NT 4.0 and earlier versions - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Casper S. Hornstrup <chorns(a)users.sourceforge.net> - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __WINNT4_H -#define __WINNT4_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _ZONE_SEGMENT_HEADER { - SINGLE_LIST_ENTRY SegmentList; - PVOID Reserved; -} ZONE_SEGMENT_HEADER, *PZONE_SEGMENT_HEADER; - -typedef struct _ZONE_HEADER { - SINGLE_LIST_ENTRY FreeList; - SINGLE_LIST_ENTRY SegmentList; - ULONG BlockSize; - ULONG TotalSegmentSize; -} ZONE_HEADER, *PZONE_HEADER; - -static __inline PVOID -ExAllocateFromZone( - IN PZONE_HEADER Zone) -{ - if (Zone->FreeList.Next) - Zone->FreeList.Next = Zone->FreeList.Next->Next; - return (PVOID) Zone->FreeList.Next; -} - -NTKERNELAPI -NTSTATUS -NTAPI -ExExtendZone( - IN PZONE_HEADER Zone, - IN PVOID Segment, - IN ULONG SegmentSize); - -static __inline PVOID -ExFreeToZone( - IN PZONE_HEADER Zone, - IN PVOID Block) -{ - ((PSINGLE_LIST_ENTRY) Block)->Next = Zone->FreeList.Next; - Zone->FreeList.Next = ((PSINGLE_LIST_ENTRY) Block); - return ((PSINGLE_LIST_ENTRY) Block)->Next; -} - -NTKERNELAPI -NTSTATUS -NTAPI -ExInitializeZone( - IN PZONE_HEADER Zone, - IN ULONG BlockSize, - IN PVOID InitialSegment, - IN ULONG InitialSegmentSize); - -/* - * PVOID - * ExInterlockedAllocateFromZone( - * IN PZONE_HEADER Zone, - * IN PKSPIN_LOCK Lock) - */ -#define ExInterlockedAllocateFromZone(Zone, \ - Lock) \ - ((PVOID) ExInterlockedPopEntryList(&Zone->FreeList, Lock)) - -NTKERNELAPI -NTSTATUS -NTAPI -ExInterlockedExtendZone( - IN PZONE_HEADER Zone, - IN PVOID Segment, - IN ULONG SegmentSize, - IN PKSPIN_LOCK Lock); - -NTKERNELAPI -PVOID -NTAPI -ExInterlockedFreeToZone( - IN PZONE_HEADER Zone, - IN PVOID Block, - IN PKSPIN_LOCK Lock); - -/* - * VOID - * ExInitializeWorkItem( - * IN PWORK_QUEUE_ITEM Item, - * IN PWORKER_THREAD_ROUTINE Routine, - * IN PVOID Context) - */ -#define ExInitializeWorkItem(Item, \ - Routine, \ - Context) \ -{ \ - (Item)->WorkerRoutine = Routine; \ - (Item)->Parameter = Context; \ - (Item)->List.Flink = NULL; \ -} - -/* - * BOOLEAN - * ExIsFullZone( - * IN PZONE_HEADER Zone) - */ -#define ExIsFullZone(Zone) \ - ((Zone)->FreeList.Next == (PSINGLE_LIST_ENTRY) NULL) - -NTKERNELAPI -VOID -NTAPI -ExQueueWorkItem( - IN PWORK_QUEUE_ITEM WorkItem, - IN WORK_QUEUE_TYPE QueueType); - -NTKERNELAPI -BOOLEAN -NTAPI -ExIsObjectInFirstZoneSegment( - IN PZONE_HEADER Zone, - IN PVOID Object); - -#define ExAcquireResourceExclusive ExAcquireResourceExclusiveLite -#define ExAcquireResourceShared ExAcquireResourceSharedLite -#define ExConvertExclusiveToShared ExConvertExclusiveToSharedLite -#define ExDeleteResource ExDeleteResourceLite -#define ExInitializeResource ExInitializeResourceLite -#define ExIsResourceAcquiredExclusive ExIsResourceAcquiredExclusiveLite -#define ExIsResourceAcquiredShared ExIsResourceAcquiredSharedLite -#define ExIsResourceAcquired ExIsResourceAcquiredSharedLite -#define ExReleaseResourceForThread ExReleaseResourceForThreadLite - -NTKERNELAPI -INTERLOCKED_RESULT -NTAPI -ExInterlockedDecrementLong( - IN PLONG Addend, - IN PKSPIN_LOCK Lock); - -NTKERNELAPI -ULONG -NTAPI -ExInterlockedExchangeUlong( - IN PULONG Target, - IN ULONG Value, - IN PKSPIN_LOCK Lock); - -NTKERNELAPI -INTERLOCKED_RESULT -NTAPI -ExInterlockedIncrementLong( - IN PLONG Addend, - IN PKSPIN_LOCK Lock); - -NTHALAPI -VOID -NTAPI -HalAcquireDisplayOwnership( - IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters); - -NTHALAPI -NTSTATUS -NTAPI -HalAllocateAdapterChannel( - IN PADAPTER_OBJECT AdapterObject, - IN PWAIT_CONTEXT_BLOCK Wcb, - IN ULONG NumberOfMapRegisters, - IN PDRIVER_CONTROL ExecutionRoutine); - -NTHALAPI -PVOID -NTAPI -HalAllocateCommonBuffer( - IN PADAPTER_OBJECT AdapterObject, - IN ULONG Length, - OUT PPHYSICAL_ADDRESS LogicalAddress, - IN BOOLEAN CacheEnabled); - -NTHALAPI -NTSTATUS -NTAPI -HalAssignSlotResources( - IN PUNICODE_STRING RegistryPath, - IN PUNICODE_STRING DriverClassName, - IN PDRIVER_OBJECT DriverObject, - IN PDEVICE_OBJECT DeviceObject, - IN INTERFACE_TYPE BusType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN OUT PCM_RESOURCE_LIST *AllocatedResources); - -NTHALAPI -VOID -NTAPI -HalFreeCommonBuffer( - IN PADAPTER_OBJECT AdapterObject, - IN ULONG Length, - IN PHYSICAL_ADDRESS LogicalAddress, - IN PVOID VirtualAddress, - IN BOOLEAN CacheEnabled); - -NTHALAPI -PADAPTER_OBJECT -NTAPI -HalGetAdapter( - IN PDEVICE_DESCRIPTION DeviceDescription, - IN OUT PULONG NumberOfMapRegisters); - -NTHALAPI -ULONG -NTAPI -HalGetBusData( - IN BUS_DATA_TYPE BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN PVOID Buffer, - IN ULONG Length); - -NTHALAPI -ULONG -NTAPI -HalGetBusDataByOffset( - IN BUS_DATA_TYPE BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN PVOID Buffer, - IN ULONG Offset, - IN ULONG Length); - -NTHALAPI -ULONG -NTAPI -HalGetDmaAlignmentRequirement( - VOID); - -NTHALAPI -ULONG -NTAPI -HalGetInterruptVector( - IN INTERFACE_TYPE InterfaceType, - IN ULONG BusNumber, - IN ULONG BusInterruptLevel, - IN ULONG BusInterruptVector, - OUT PKIRQL Irql, - OUT PKAFFINITY Affinity); - -NTHALAPI -ULONG -NTAPI -HalReadDmaCounter( - IN PADAPTER_OBJECT AdapterObject); - -NTHALAPI -ULONG -NTAPI -HalSetBusData( - IN BUS_DATA_TYPE BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN PVOID Buffer, - IN ULONG Length); - -NTHALAPI -ULONG -NTAPI -HalSetBusDataByOffset( - IN BUS_DATA_TYPE BusDataType, - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN PVOID Buffer, - IN ULONG Offset, - IN ULONG Length); - -NTHALAPI -BOOLEAN -NTAPI -HalTranslateBusAddress( - IN INTERFACE_TYPE InterfaceType, - IN ULONG BusNumber, - IN PHYSICAL_ADDRESS BusAddress, - IN OUT PULONG AddressSpace, - OUT PPHYSICAL_ADDRESS TranslatedAddress); - -NTKERNELAPI -NTSTATUS -NTAPI -IoAllocateAdapterChannel( - IN PADAPTER_OBJECT AdapterObject, - IN PDEVICE_OBJECT DeviceObject, - IN ULONG NumberOfMapRegisters, - IN PDRIVER_CONTROL ExecutionRoutine, - IN PVOID Context); - -NTKERNELAPI -NTSTATUS -NTAPI -IoAssignResources( - IN PUNICODE_STRING RegistryPath, - IN PUNICODE_STRING DriverClassName OPTIONAL, - IN PDRIVER_OBJECT DriverObject, - IN PDEVICE_OBJECT DeviceObject OPTIONAL, - IN PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources, - IN OUT PCM_RESOURCE_LIST *AllocatedResources); - -NTKERNELAPI -NTSTATUS -NTAPI -IoAttachDeviceByPointer( - IN PDEVICE_OBJECT SourceDevice, - IN PDEVICE_OBJECT TargetDevice); - -NTHALAPI -BOOLEAN -NTAPI -IoFlushAdapterBuffers( - IN PADAPTER_OBJECT AdapterObject, - IN PMDL Mdl, - IN PVOID MapRegisterBase, - IN PVOID CurrentVa, - IN ULONG Length, - IN BOOLEAN WriteToDevice); - -NTHALAPI -VOID -NTAPI -IoFreeAdapterChannel( - IN PADAPTER_OBJECT AdapterObject); - -NTHALAPI -VOID -NTAPI -IoFreeMapRegisters( - IN PADAPTER_OBJECT AdapterObject, - IN PVOID MapRegisterBase, - IN ULONG NumberOfMapRegisters); - -NTHALAPI -PHYSICAL_ADDRESS -NTAPI -IoMapTransfer( - IN PADAPTER_OBJECT AdapterObject, - IN PMDL Mdl, - IN PVOID MapRegisterBase, - IN PVOID CurrentVa, - IN OUT PULONG Length, - IN BOOLEAN WriteToDevice); - -NTKERNELAPI -PMDL -NTAPI -MmCreateMdl( - IN PMDL MemoryDescriptorList OPTIONAL, - IN PVOID Base, - IN SIZE_T Length); - -NTKERNELAPI -BOOLEAN -NTAPI -MmIsNonPagedSystemAddressValid( - IN PVOID VirtualAddress); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlEnlargedIntegerMultiply( - IN LONG Multiplicand, - IN LONG Multiplier); - -NTSYSAPI -ULONG -NTAPI -RtlEnlargedUnsignedDivide( - IN ULARGE_INTEGER Dividend, - IN ULONG Divisor, - IN OUT PULONG Remainder); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlEnlargedUnsignedMultiply( - IN ULONG Multiplicand, - IN ULONG Multiplier); - -#ifndef _M_AMD64 -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlExtendedIntegerMultiply( - IN LARGE_INTEGER Multiplicand, - IN LONG Multiplier); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlExtendedLargeIntegerDivide( - IN LARGE_INTEGER Dividend, - IN ULONG Divisor, - IN OUT PULONG Remainder); -#endif - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlExtendedMagicDivide( - IN LARGE_INTEGER Dividend, - IN LARGE_INTEGER MagicDivisor, - IN CCHAR ShiftCount); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlLargeIntegerAdd( - IN LARGE_INTEGER Addend1, - IN LARGE_INTEGER Addend2); - -NTSYSAPI -VOID -NTAPI -RtlLargeIntegerAnd( - IN OUT LARGE_INTEGER Result, - IN LARGE_INTEGER Source, - IN LARGE_INTEGER Mask); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlLargeIntegerArithmeticShift( - IN LARGE_INTEGER LargeInteger, - IN CCHAR ShiftCount); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlLargeIntegerDivide( - IN LARGE_INTEGER Dividend, - IN LARGE_INTEGER Divisor, - IN OUT PLARGE_INTEGER Remainder); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerEqualTo( - IN LARGE_INTEGER Operand1, - IN LARGE_INTEGER Operand2); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerEqualToZero( - IN LARGE_INTEGER Operand); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerGreaterOrEqualToZero( - IN LARGE_INTEGER Operand); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerGreaterThan( - IN LARGE_INTEGER Operand1, - IN LARGE_INTEGER Operand2); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerGreaterThanOrEqualTo( - IN LARGE_INTEGER Operand1, - IN LARGE_INTEGER Operand2); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerGreaterThanZero( - IN LARGE_INTEGER Operand); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerLessOrEqualToZero( - IN LARGE_INTEGER Operand); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerLessThan( - IN LARGE_INTEGER Operand1, - IN LARGE_INTEGER Operand2); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerLessThanOrEqualTo( - IN LARGE_INTEGER Operand1, - IN LARGE_INTEGER Operand2); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerLessThanZero( - IN LARGE_INTEGER Operand); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlLargeIntegerNegate( - IN LARGE_INTEGER Subtrahend); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerNotEqualTo( - IN LARGE_INTEGER Operand1, - IN LARGE_INTEGER Operand2); - -NTSYSAPI -BOOLEAN -NTAPI -RtlLargeIntegerNotEqualToZero( - IN LARGE_INTEGER Operand); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlLargeIntegerShiftLeft( - IN LARGE_INTEGER LargeInteger, - IN CCHAR ShiftCount); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlLargeIntegerShiftRight( - IN LARGE_INTEGER LargeInteger, - IN CCHAR ShiftCount); - -NTSYSAPI -LARGE_INTEGER -NTAPI -RtlLargeIntegerSubtract( - IN LARGE_INTEGER Minuend, - IN LARGE_INTEGER Subtrahend); - - -/* - * ULONG - * COMPUTE_PAGES_SPANNED( - * IN PVOID Va, - * IN ULONG Size) - */ -#define COMPUTE_PAGES_SPANNED(Va, \ - Size) \ - (ADDRESS_AND_SIZE_TO_SPAN_PAGES(Va, Size)) - - -/* -** Architecture specific structures -*/ - -#ifdef _X86_ - -NTKERNELAPI -INTERLOCKED_RESULT -FASTCALL -Exfi386InterlockedIncrementLong( - IN PLONG Addend); - -NTKERNELAPI -INTERLOCKED_RESULT -FASTCALL -Exfi386InterlockedDecrementLong( - IN PLONG Addend); - -NTKERNELAPI -ULONG -FASTCALL -Exfi386InterlockedExchangeUlong( - IN PULONG Target, - IN ULONG Value); - -#define ExInterlockedIncrementLong(Addend,Lock) Exfi386InterlockedIncrementLong(Addend) -#define ExInterlockedDecrementLong(Addend,Lock) Exfi386InterlockedDecrementLong(Addend) -#define ExInterlockedExchangeUlong(Target, Value, Lock) Exfi386InterlockedExchangeUlong(Target, Value) - -#endif /* _X86_ */ - -#ifdef __cplusplus -} -#endif - -#endif /* __WINNT4_H */ Removed: trunk/reactos/include/ddk/winxp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winxp.h?rev=39…
============================================================================== --- trunk/reactos/include/ddk/winxp.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winxp.h (removed) @@ -1,34 +1,0 @@ -/* - * winxp.h - * - * Definitions only used in Windows XP and earlier versions - * - * This file is part of the w32api package. - * - * Contributors: - * Created by Casper S. Hornstrup <chorns(a)users.sourceforge.net> - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#ifndef __WINXP_H -#define __WINXP_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __WINXP_H */
15 years, 10 months
1
0
0
0
[dgorbachev] 39538: mpu401.sys: remove entrypoint="..." bootvid.dll, kdcom.dll: entrypoint="0"
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Tue Feb 10 15:15:45 2009 New Revision: 39538 URL:
http://svn.reactos.org/svn/reactos?rev=39538&view=rev
Log: mpu401.sys: remove entrypoint="..." bootvid.dll, kdcom.dll: entrypoint="0" Modified: trunk/reactos/drivers/base/bootvid/bootvid.rbuild trunk/reactos/drivers/base/kdcom/kdcom.rbuild trunk/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild Modified: trunk/reactos/drivers/base/bootvid/bootvid.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/bootv…
============================================================================== --- trunk/reactos/drivers/base/bootvid/bootvid.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/base/bootvid/bootvid.rbuild [iso-8859-1] Tue Feb 10 15:15:45 2009 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> -<module name="bootvid" type="kernelmodedll" entrypoint="DriverEntry@8" installbase="system32/drivers" installname="bootvid.dll"> +<module name="bootvid" type="kernelmodedll" entrypoint="0" installbase="system32/drivers" installname="bootvid.dll"> <importlibrary definition="bootvid.spec"></importlibrary> <bootstrap installbase="$(CDOUTPUT)" nameoncd="bootvid.dll" /> <include base="bootvid">.</include> Modified: trunk/reactos/drivers/base/kdcom/kdcom.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kdcom/kdcom.r…
============================================================================== --- trunk/reactos/drivers/base/kdcom/kdcom.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kdcom/kdcom.rbuild [iso-8859-1] Tue Feb 10 15:15:45 2009 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> -<module name="kdcom" type="kernelmodedll" entrypoint="DriverEntry@8" installbase="system32" installname="kdcom.dll"> +<module name="kdcom" type="kernelmodedll" entrypoint="0" installbase="system32" installname="kdcom.dll"> <importlibrary definition="kdcom.spec"></importlibrary> <bootstrap installbase="$(CDOUTPUT)" nameoncd="kdcom.dll" /> <include base="kdcom">.</include> @@ -8,12 +8,12 @@ <library>hal</library> <if property="ARCH" value="i386"> <directory name="i386"> - <file>kdbg.c</file> + <file>kdbg.c</file> </directory> </if> <if property="ARCH" value="arm"> <directory name="arm"> - <file>kdbg.c</file> + <file>kdbg.c</file> </directory> </if> </module> Modified: trunk/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild [iso-8859-1] Tue Feb 10 15:15:45 2009 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../../../tools/rbuild/project.dtd"> -<module name="mpu401" type="kernelmodedriver" installbase="system32/drivers" installname="mpu401.sys" entrypoint="DriverEntry"> +<module name="mpu401" type="kernelmodedriver" installbase="system32/drivers" installname="mpu401.sys" allowwarnings="true"> <include base="mpu401">.</include> <include base="mpu401">..</include> <library>ntoskrnl</library>
15 years, 10 months
1
0
0
0
[tkreuzer] 39533: x64 version of ntoskrnl doesn't export ExInterlockedAddLargeStatistic
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Feb 10 09:15:07 2009 New Revision: 39533 URL:
http://svn.reactos.org/svn/reactos?rev=39533&view=rev
Log: x64 version of ntoskrnl doesn't export ExInterlockedAddLargeStatistic Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] Tue Feb 10 09:15:07 2009 @@ -104,7 +104,9 @@ @ stdcall ExInitializeRundownProtectionCacheAware(ptr long) @ stdcall ExInitializeZone(ptr long ptr long) @ stdcall ExInterlockedAddLargeInteger(ptr long long ptr) +#ifndef __x86_64__ @ fastcall ExInterlockedAddLargeStatistic(ptr long) +#endif @ stdcall ExInterlockedAddUlong(ptr long ptr) #ifndef __x86_64__ @ fastcall ExInterlockedCompareExchange64(ptr ptr ptr ptr)
15 years, 10 months
2
1
0
0
[spetreolle] 39537: RtlCreateUnicodeString needs ntifs.h inclusion.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Tue Feb 10 13:58:01 2009 New Revision: 39537 URL:
http://svn.reactos.org/svn/reactos?rev=39537&view=rev
Log: RtlCreateUnicodeString needs ntifs.h inclusion. Modified: trunk/reactos/drivers/wdm/audio/sysaudio/main.c trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h Modified: trunk/reactos/drivers/wdm/audio/sysaudio/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
============================================================================== --- trunk/reactos/drivers/wdm/audio/sysaudio/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/sysaudio/main.c [iso-8859-1] Tue Feb 10 13:58:01 2009 @@ -9,6 +9,7 @@ * 8 Jul 07 Started basic implementation */ +#include <ntifs.h> #include <ntddk.h> #include <ks.h> #define YDEBUG Modified: trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
============================================================================== --- trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h [iso-8859-1] Tue Feb 10 13:58:01 2009 @@ -23,13 +23,4 @@ KMUTEX Mutex; }SYSAUDIODEVEXT; - -BOOLEAN -NTAPI - RtlCreateUnicodeString( - OUT PUNICODE_STRING DestinationString, - IN PCWSTR SourceString - ); - - #endif
15 years, 10 months
1
0
0
0
[dchapyshev] 39536: - Implement HeapSetInformation - Implement HeapQueryInformation
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Tue Feb 10 12:34:54 2009 New Revision: 39536 URL:
http://svn.reactos.org/svn/reactos?rev=39536&view=rev
Log: - Implement HeapSetInformation - Implement HeapQueryInformation Modified: trunk/reactos/dll/win32/kernel32/mem/heap.c trunk/reactos/dll/win32/kernel32/misc/stubs.c Modified: trunk/reactos/dll/win32/kernel32/mem/heap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/mem/hea…
============================================================================== --- trunk/reactos/dll/win32/kernel32/mem/heap.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/mem/heap.c [iso-8859-1] Tue Feb 10 12:34:54 2009 @@ -271,4 +271,58 @@ return TRUE; } +/* + * @implemented + */ +BOOL +WINAPI +HeapQueryInformation(HANDLE HeapHandle, + HEAP_INFORMATION_CLASS HeapInformationClass, + PVOID HeapInformation OPTIONAL, + SIZE_T HeapInformationLength OPTIONAL, + PSIZE_T ReturnLength OPTIONAL) +{ + NTSTATUS Status; + + Status = RtlQueryHeapInformation(HeapHandle, + HeapInformationClass, + HeapInformation, + HeapInformationLength, + ReturnLength); + + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + return TRUE; +} + +/* + * @implemented + */ +BOOL +WINAPI +HeapSetInformation(HANDLE HeapHandle, + HEAP_INFORMATION_CLASS HeapInformationClass, + PVOID HeapInformation OPTIONAL, + SIZE_T HeapInformationLength OPTIONAL) +{ + NTSTATUS Status; + + Status = RtlSetHeapInformation(HeapHandle, + HeapInformationClass, + HeapInformation, + HeapInformationLength); + + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + return TRUE; +} + /* EOF */ Modified: trunk/reactos/dll/win32/kernel32/misc/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/st…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/stubs.c [iso-8859-1] Tue Feb 10 12:34:54 2009 @@ -380,39 +380,6 @@ GetNumaProcessorNode( UCHAR Processor, PUCHAR NodeNumber - ) -{ - STUB; - return 0; -} - -/* - * @unimplemented - */ -BOOL -WINAPI -HeapQueryInformation ( - HANDLE HeapHandle, - HEAP_INFORMATION_CLASS HeapInformationClass, - PVOID HeapInformation OPTIONAL, - SIZE_T HeapInformationLength OPTIONAL, - PSIZE_T ReturnLength OPTIONAL - ) -{ - STUB; - return 0; -} - -/* - * @unimplemented - */ -BOOL -WINAPI -HeapSetInformation ( - HANDLE HeapHandle, - HEAP_INFORMATION_CLASS HeapInformationClass, - PVOID HeapInformation OPTIONAL, - SIZE_T HeapInformationLength OPTIONAL ) { STUB;
15 years, 10 months
1
0
0
0
[janderwald] 39535: - Handle IRP_MN_QUERY_PNP_DEVICE_STATE - Implement opening KS_CATEGORY_AUDIO devices (used with extreme hack since opening sym link is not working atm)
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Feb 10 10:28:24 2009 New Revision: 39535 URL:
http://svn.reactos.org/svn/reactos?rev=39535&view=rev
Log: - Handle IRP_MN_QUERY_PNP_DEVICE_STATE - Implement opening KS_CATEGORY_AUDIO devices (used with extreme hack since opening sym link is not working atm) Modified: trunk/reactos/drivers/wdm/audio/sysaudio/main.c trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h Modified: trunk/reactos/drivers/wdm/audio/sysaudio/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
============================================================================== --- trunk/reactos/drivers/wdm/audio/sysaudio/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/sysaudio/main.c [iso-8859-1] Tue Feb 10 10:28:24 2009 @@ -16,76 +16,146 @@ //#include <dxsdk/mediaobj.h> #include "sysaudio.h" - - -const GUID KS_CATEGORY_AUDIO = {0x6994AD04, 0x93EF, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}; -VOID -NTAPI -SysAudio_Unload(IN PDRIVER_OBJECT DriverObject) -{ - DPRINT1("SysAudio_Unload called\n"); -} - -NTSTATUS -NTAPI -SysAudio_Pnp( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - PIO_STACK_LOCATION IrpStack; - UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\DosDevices\\sysaudio"); - SYSAUDIODEVEXT *DeviceExtension; - - DPRINT1("SysAudio_Pnp called\n"); - - - IrpStack = IoGetCurrentIrpStackLocation(Irp); - - DeviceExtension = (SYSAUDIODEVEXT*)DeviceObject->DeviceExtension; - - if (IrpStack->MinorFunction == IRP_MN_REMOVE_DEVICE) - { - if (DeviceExtension->EchoCancelNotificationEntry) - IoUnregisterPlugPlayNotification(DeviceExtension->EchoCancelNotificationEntry); - - if (DeviceExtension->KsAudioNotificationEntry) - IoUnregisterPlugPlayNotification(DeviceExtension->KsAudioNotificationEntry); - - IoDeleteSymbolicLink(&SymlinkName); - } - - return KsDefaultDispatchPnp(DeviceObject, Irp); -} - -NTSTATUS -NTAPI -DeviceInterfaceChangeCallback( - IN PVOID NotificationStructure, - IN PVOID Context) -{ - DEVICE_INTERFACE_CHANGE_NOTIFICATION * Event = (DEVICE_INTERFACE_CHANGE_NOTIFICATION*)NotificationStructure; - - DPRINT1("DeviceInterfaceChangeCallback called %p\n", Event); - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -DispatchCreate( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - DPRINT1("DispatchCreate\n"); - - return STATUS_SUCCESS; -} - const GUID KSCATEGORY_AUDIO_DEVICE = {0xFBF6F530L, 0x07B9, 0x11D2, {0xA7, 0x1E, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88}}; const GUID KSCATEGORY_PREFERRED_WAVEOUT_DEVICE = {0xD6C5066EL, 0x72C1, 0x11D2, {0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88}}; const GUID KSCATEGORY_PREFERRED_WAVEIN_DEVICE = {0xD6C50671L, 0x72C1, 0x11D2, {0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88}}; const GUID KSCATEGORY_PREFERRED_MIDIOUT_DEVICE = {0xD6C50674L, 0x72C1, 0x11D2, {0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88}}; - - +const GUID KS_CATEGORY_AUDIO = {0x6994AD04L, 0x93EF, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}; +const GUID GUID_DEVICE_INTERFACE_ARRIVAL = {0xCB3A4004L, 0x46F0, 0x11D0, {0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F}}; +const GUID GUID_DEVICE_INTERFACE_REMOVAL = {0xCB3A4005L, 0x46F0, 0x11D0, {0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F}}; + + +VOID +NTAPI +SysAudio_Unload(IN PDRIVER_OBJECT DriverObject) +{ + DPRINT1("SysAudio_Unload called\n"); +} + +NTSTATUS +NTAPI +SysAudio_Pnp( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PIO_STACK_LOCATION IrpStack; + UNICODE_STRING SymlinkName = RTL_CONSTANT_STRING(L"\\DosDevices\\sysaudio"); + SYSAUDIODEVEXT *DeviceExtension; + + DPRINT1("SysAudio_Pnp called\n"); + + + IrpStack = IoGetCurrentIrpStackLocation(Irp); + + DeviceExtension = (SYSAUDIODEVEXT*)DeviceObject->DeviceExtension; + + if (IrpStack->MinorFunction == IRP_MN_REMOVE_DEVICE) + { + if (DeviceExtension->EchoCancelNotificationEntry) + IoUnregisterPlugPlayNotification(DeviceExtension->EchoCancelNotificationEntry); + + if (DeviceExtension->KsAudioNotificationEntry) + IoUnregisterPlugPlayNotification(DeviceExtension->KsAudioNotificationEntry); + + IoDeleteSymbolicLink(&SymlinkName); + } + else if (IrpStack->MinorFunction == IRP_MN_QUERY_PNP_DEVICE_STATE) + { + Irp->IoStatus.Information |= PNP_DEVICE_NOT_DISABLEABLE; + } + + return KsDefaultDispatchPnp(DeviceObject, Irp); +} + +NTSTATUS +NTAPI +DeviceInterfaceChangeCallback( + IN PVOID NotificationStructure, + IN PVOID Context) +{ + DEVICE_INTERFACE_CHANGE_NOTIFICATION * Event; + SYSAUDIODEVEXT *DeviceExtension = (SYSAUDIODEVEXT*)Context; + NTSTATUS Status = STATUS_SUCCESS; + + Event = (DEVICE_INTERFACE_CHANGE_NOTIFICATION*)NotificationStructure; + + if (IsEqualGUIDAligned(&Event->Event, + &GUID_DEVICE_INTERFACE_ARRIVAL)) + { + /* a new device has arrived */ + + PFILE_OBJECT FileObject = NULL; + PDEVICE_OBJECT DeviceObject = NULL; + UNICODE_STRING DeviceName; + PKSAUDIO_DEVICE_ENTRY DeviceEntry; + + DeviceEntry = ExAllocatePool(NonPagedPool, sizeof(KSAUDIO_DEVICE_ENTRY)); + if (!DeviceEntry) + return STATUS_INSUFFICIENT_RESOURCES; + + if (!RtlCreateUnicodeString(&DeviceEntry->DeviceName, Event->SymbolicLinkName->Buffer)) + { + ExFreePool(DeviceEntry); + return STATUS_INSUFFICIENT_RESOURCES; + } + +#if 1 //HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK + RtlInitUnicodeString(&DeviceName, L"\\Device\\00000017"); +#else + RtlInitUnicodeString(&DeviceName, Event->SymbolicLinkName->Buffer); +#endif + + Status = IoGetDeviceObjectPointer(&DeviceName, + FILE_READ_DATA | FILE_WRITE_DATA, + &FileObject, + &DeviceObject); + + if (!NT_SUCCESS(Status)) + { + ExFreePool(DeviceEntry); + return Status; + } + + DeviceEntry->DeviceObject = DeviceObject; + DeviceEntry->FileObject = FileObject; + + InsertTailList(&DeviceExtension->KsAudioDeviceList, &DeviceEntry->Entry); + DeviceExtension->NumberOfKsAudioDevices++; + + DPRINT1("Successfully opened audio device\n"); + return Status; + } + else if (IsEqualGUIDAligned(&Event->Event, + &GUID_DEVICE_INTERFACE_REMOVAL)) + { + DPRINT1("Remove interface to audio device!\n"); + ///FIXME + /// + return STATUS_SUCCESS; + } + else + { + UNICODE_STRING EventName, InterfaceGuid; + + RtlStringFromGUID(&Event->Event, &EventName); + RtlStringFromGUID(&Event->InterfaceClassGuid, &InterfaceGuid); + DPRINT1("Unknown event: Event %wZ GUID %wZ\n", &EventName, &InterfaceGuid); + return STATUS_SUCCESS; + } + + +} + +NTSTATUS +NTAPI +DispatchCreate( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT1("DispatchCreate\n"); + + return STATUS_SUCCESS; +} NTSTATUS NTAPI @@ -135,8 +205,8 @@ RtlZeroMemory(DeviceExtension, sizeof(SYSAUDIODEVEXT)); KeInitializeMutex(&DeviceExtension->Mutex, 0); - DeviceExtension->PhysicalDeviceObject = PhysicalDeviceObject; + InitializeListHead(&DeviceExtension->KsAudioDeviceList); /* initialize create item struct */ RtlZeroMemory(&CreateItem, sizeof(KSOBJECT_CREATE_ITEM)); @@ -222,6 +292,24 @@ return Status; } +NTSTATUS +NTAPI +SysAudio_Stub( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT1("SysAudio_Stub called\n"); + + /* TODO */ + + Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Information = 0; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return STATUS_SUCCESS; +} + + NTSTATUS NTAPI DriverEntry( IN PDRIVER_OBJECT DriverObject, @@ -230,10 +318,19 @@ DPRINT1("System audio graph builder (sysaudio) started\n"); DPRINT1("Setting KS function handlers\n"); + +#if KS_IMPLEMENTED KsSetMajorFunctionHandler(DriverObject, IRP_MJ_CREATE); KsSetMajorFunctionHandler(DriverObject, IRP_MJ_CLOSE); KsSetMajorFunctionHandler(DriverObject, IRP_MJ_WRITE); KsSetMajorFunctionHandler(DriverObject, IRP_MJ_DEVICE_CONTROL); +#else + DriverObject->MajorFunction[IRP_MJ_CREATE] = SysAudio_Stub; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = SysAudio_Stub; + DriverObject->MajorFunction[IRP_MJ_WRITE] = SysAudio_Stub; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = SysAudio_Stub; +#endif + DriverObject->MajorFunction[IRP_MJ_POWER] = KsDefaultDispatchPower; DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = KsDefaultForwardIrp; Modified: trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
============================================================================== --- trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h [iso-8859-1] Tue Feb 10 10:28:24 2009 @@ -1,6 +1,14 @@ #ifndef SYSAUDIO_H__ #define SYSAUDIO_H__ +typedef struct +{ + LIST_ENTRY Entry; + PDEVICE_OBJECT DeviceObject; + PFILE_OBJECT FileObject; + UNICODE_STRING DeviceName; + +}KSAUDIO_DEVICE_ENTRY, *PKSAUDIO_DEVICE_ENTRY; typedef struct @@ -8,13 +16,20 @@ PDEVICE_OBJECT PhysicalDeviceObject; PDEVICE_OBJECT NextDeviceObject; KSDEVICE_HEADER KsDeviceHeader; + ULONG NumberOfKsAudioDevices; + LIST_ENTRY KsAudioDeviceList; PVOID KsAudioNotificationEntry; PVOID EchoCancelNotificationEntry; KMUTEX Mutex; }SYSAUDIODEVEXT; - +BOOLEAN +NTAPI + RtlCreateUnicodeString( + OUT PUNICODE_STRING DestinationString, + IN PCWSTR SourceString + ); #endif
15 years, 10 months
1
0
0
0
[tkreuzer] 39534: - Move interlocked functions from winddk.h to wdm.h - Fix some typos - Define ExGetCurrentResourceThread for _WIN64, too - Fix ExReleaseResource and move it to wdm.h
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Feb 10 10:11:13 2009 New Revision: 39534 URL:
http://svn.reactos.org/svn/reactos?rev=39534&view=rev
Log: - Move interlocked functions from winddk.h to wdm.h - Fix some typos - Define ExGetCurrentResourceThread for _WIN64, too - Fix ExReleaseResource and move it to wdm.h Modified: trunk/reactos/include/ddk/wdm.h trunk/reactos/include/ddk/winddk.h trunk/reactos/include/ddk/winnt4.h Modified: trunk/reactos/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=3953…
============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Tue Feb 10 10:11:13 2009 @@ -224,11 +224,140 @@ #define BitScanForward _BitScanForward #define BitScanReverse _BitScanReverse -#ifdef _M_AMD64 +#define BitTest _bittest +#define BitTestAndComplement _bittestandcomplement +#define BitTestAndSet _bittestandset +#define BitTestAndReset _bittestandreset +#define InterlockedBitTestAndSet _interlockedbittestandset +#define InterlockedBitTestAndReset _interlockedbittestandreset + + +/** INTERLOCKED FUNCTIONS *****************************************************/ + +#if !defined(__INTERLOCKED_DECLARED) +#define __INTERLOCKED_DECLARED + +#if defined (_X86_) +#if defined(NO_INTERLOCKED_INTRINSICS) +NTKERNELAPI +LONG +FASTCALL +InterlockedIncrement( + IN OUT LONG volatile *Addend); + +NTKERNELAPI +LONG +FASTCALL +InterlockedDecrement( + IN OUT LONG volatile *Addend); + +NTKERNELAPI +LONG +FASTCALL +InterlockedCompareExchange( + IN OUT LONG volatile *Destination, + IN LONG Exchange, + IN LONG Comparand); + +NTKERNELAPI +LONG +FASTCALL +InterlockedExchange( + IN OUT LONG volatile *Destination, + IN LONG Value); + +NTKERNELAPI +LONG +FASTCALL +InterlockedExchangeAdd( + IN OUT LONG volatile *Addend, + IN LONG Value); + +#else // !defined(NO_INTERLOCKED_INTRINSICS) + +#define InterlockedExchange _InterlockedExchange +#define InterlockedIncrement _InterlockedIncrement +#define InterlockedDecrement _InterlockedDecrement +#define InterlockedExchangeAdd _InterlockedExchangeAdd +#define InterlockedCompareExchange _InterlockedCompareExchange +#define InterlockedOr _InterlockedOr +#define InterlockedAnd _InterlockedAnd +#define InterlockedXor _InterlockedXor + +#endif // !defined(NO_INTERLOCKED_INTRINSICS) + +#endif // defined (_X86_) + +#if !defined (_WIN64) +/* + * PVOID + * InterlockedExchangePointer( + * IN OUT PVOID VOLATILE *Target, + * IN PVOID Value) + */ +#define InterlockedExchangePointer(Target, Value) \ + ((PVOID) InterlockedExchange((PLONG) Target, (LONG) Value)) + +/* + * PVOID + * InterlockedCompareExchangePointer( + * IN OUT PVOID *Destination, + * IN PVOID Exchange, + * IN PVOID Comparand) + */ +#define InterlockedCompareExchangePointer(Destination, Exchange, Comparand) \ + ((PVOID) InterlockedCompareExchange((PLONG) Destination, (LONG) Exchange, (LONG) Comparand)) + +#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b) +#define InterlockedIncrementSizeT(a) InterlockedIncrement((LONG *)a) +#define InterlockedDecrementSizeT(a) InterlockedDecrement((LONG *)a) + +#endif // !defined (_WIN64) + +#if defined (_M_AMD64) + +#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONGLONG *)a, (LONGLONG)b) +#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONGLONG *)a) +#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONGLONG *)a) +#define InterlockedAnd _InterlockedAnd +#define InterlockedOr _InterlockedOr +#define InterlockedXor _InterlockedXor +#define InterlockedIncrement _InterlockedIncrement +#define InterlockedDecrement _InterlockedDecrement +#define InterlockedAdd _InterlockedAdd +#define InterlockedExchange _InterlockedExchange +#define InterlockedExchangeAdd _InterlockedExchangeAdd +#define InterlockedCompareExchange _InterlockedCompareExchange +#define InterlockedAnd64 _InterlockedAnd64 +#define InterlockedOr64 _InterlockedOr64 +#define InterlockedXor64 _InterlockedXor64 +#define InterlockedIncrement64 _InterlockedIncrement64 +#define InterlockedDecrement64 _InterlockedDecrement64 +#define InterlockedAdd64 _InterlockedAdd64 +#define InterlockedExchange64 _InterlockedExchange64 +#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 +#define InterlockedCompareExchange64 _InterlockedCompareExchange64 +#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer +#define InterlockedExchangePointer _InterlockedExchangePointer #define InterlockedBitTestAndSet64 _interlockedbittestandset64 #define InterlockedBitTestAndReset64 _interlockedbittestandreset64 -#endif - + +#endif // _M_AMD64 + +#if defined(_M_AMD64) && !defined(RC_INVOKED) && !defined(MIDL_PASS) +//#if !defined(_X86AMD64_) // FIXME: what's _X86AMD64_ used for? +FORCEINLINE +LONG64 +InterlockedAdd64( + IN OUT LONG64 volatile *Addend, + IN LONG64 Value) +{ + return InterlockedExchangeAdd64(Addend, Value) + Value; +} +//#endif +#endif + +#endif /* !__INTERLOCKED_DECLARED */ #if defined(_M_IX86) #define YieldProcessor _mm_pause @@ -1629,7 +1758,7 @@ { volatile char* vptr = (volatile char*)Pointer; #if defined(_M_AMD64) - _stosb((PUCHAR)vptr, 0, Size); + __stosb((PUCHAR)vptr, 0, Size); #else char * endptr = (char *)vptr + Size; while (vptr < endptr) @@ -1645,7 +1774,7 @@ ULONG RtlCheckBit( IN PRTL_BITMAP BitMapHeader, - IN ULONG BitPosition); + IN ULONG BitPosition) { return BitTest((LONG CONST*)BitMapHeader->Buffer, BitPosition); } @@ -1773,7 +1902,7 @@ #if !defined(_WIN64) && (defined(_NTDDK_) || defined(_NTIFS_) || defined(_NDIS_)) #define LOOKASIDE_ALIGN #else -#define LOOKASIDE_ALIGN DECLSPEC_CACHEALIGN +#define LOOKASIDE_ALIGN /* FIXME: DECLSPEC_CACHEALIGN */ #endif typedef struct _LOOKASIDE_LIST_EX *PLOOKASIDE_LIST_EX; @@ -1873,25 +2002,35 @@ * Executive Functions * ******************************************************************************/ -#if defined (_WIN64) -#if defined(_NTDRIVER_) || defined(_NTDDK) || defined(_NTIFS_) || \ +#if defined(_X86_) +#if defined(_NTHAL_) +#define ExAcquireFastMutex ExiAcquireFastMutex +#define ExReleaseFastMutex ExiReleaseFastMutex +#define ExTryToAcquireFastMutex ExiTryToAcquireFastMutex +#endif +#define ExInterlockedAddUlong ExfInterlockedAddUlong +#define ExInterlockedInsertHeadList ExfInterlockedInsertHeadList +#define ExInterlockedInsertTailList ExfInterlockedInsertTailList +#define ExInterlockedRemoveHeadList ExfInterlockedRemoveHeadList +#define ExInterlockedPopEntryList ExfInterlockedPopEntryList +#define ExInterlockedPushEntryList ExfInterlockedPushEntryList +#endif + +#if defined(_WIN64) + +#if defined(_NTDRIVER_) || defined(_NTDDK_) || defined(_NTIFS_) || \ defined(_NTHAL_) || defined(_NTOSP_) -NTKRNLAPI +NTKERNELAPI USHORT -ExQueryDepthSList(IN PSLIST_HEADER Listhead); +ExQueryDepthSList(IN PSLIST_HEADER ListHead); #else FORCEINLINE USHORT -ExQueryDepthSList(IN PSLIST_HEADER Listhead) +ExQueryDepthSList(IN PSLIST_HEADER ListHead) { return (USHORT)(ListHead->Alignment & 0xffff); } #endif -#else -#define ExQueryDepthSList(listhead) (listhead)->Depth -#endif - -#if defined(_WIN64) NTKERNELAPI PSLIST_ENTRY @@ -1917,6 +2056,8 @@ ExpInterlockedPushEntrySList(Head, Entry) #else // !defined(_WIN64) + +#define ExQueryDepthSList(listhead) (listhead)->Depth NTKERNELAPI PSINGLE_LIST_ENTRY @@ -1946,30 +2087,17 @@ InterlockedPushEntrySList(_ListHead, _ListEntry) #endif // _WIN2K_COMPAT_SLIST_USAGE +#endif // !defined(_WIN64) + /* ERESOURCE_THREAD * ExGetCurrentResourceThread( * VOID); */ #define ExGetCurrentResourceThread() ((ERESOURCE_THREAD)PsGetCurrentThread()) -#endif // !defined(_WIN64) +#define ExReleaseResource(R) (ExReleaseResourceLite(R)) #if (NTDDI_VERSION >= NTDDI_WIN2K) - -#if defined(_NTHAL_) && defined(_X86_) -#define ExAcquireFastMutex ExiAcquireFastMutex -#define ExReleaseFastMutex ExiReleaseFastMutex -#define ExTryToAcquireFastMutex ExiTryToAcquireFastMutex -#endif - -#if defined(_X86_) -#define ExInterlockedAddUlong ExfInterlockedAddUlong -#define ExInterlockedInsertHeadList ExfInterlockedInsertHeadList -#define ExInterlockedInsertTailList ExfInterlockedInsertTailList -#define ExInterlockedRemoveHeadList ExfInterlockedRemoveHeadList -#define ExInterlockedPopEntryList ExfInterlockedPopEntryList -#define ExInterlockedPushEntryList ExfInterlockedPushEntryList -#endif NTKERNELAPI VOID Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Tue Feb 10 10:11:13 2009 @@ -5786,119 +5786,6 @@ } PCIBUSDATA, *PPCIBUSDATA; -/** INTERLOCKED FUNCTIONS *****************************************************/ - -#if !defined(__INTERLOCKED_DECLARED) -#define __INTERLOCKED_DECLARED - -#if defined (_X86_) -#if defined(NO_INTERLOCKED_INTRINSICS) -NTKERNELAPI -LONG -FASTCALL -InterlockedIncrement( - IN OUT LONG volatile *Addend); - -NTKERNELAPI -LONG -FASTCALL -InterlockedDecrement( - IN OUT LONG volatile *Addend); - -NTKERNELAPI -LONG -FASTCALL -InterlockedCompareExchange( - IN OUT LONG volatile *Destination, - IN LONG Exchange, - IN LONG Comparand); - -NTKERNELAPI -LONG -FASTCALL -InterlockedExchange( - IN OUT LONG volatile *Destination, - IN LONG Value); - -NTKERNELAPI -LONG -FASTCALL -InterlockedExchangeAdd( - IN OUT LONG volatile *Addend, - IN LONG Value); - -#else // !defined(NO_INTERLOCKED_INTRINSICS) - -#define InterlockedExchange _InterlockedExchange -#define InterlockedIncrement _InterlockedIncrement -#define InterlockedDecrement _InterlockedDecrement -#define InterlockedExchangeAdd _InterlockedExchangeAdd -#define InterlockedCompareExchange _InterlockedCompareExchange -#define InterlockedOr _InterlockedOr -#define InterlockedAnd _InterlockedAnd -#define InterlockedXor _InterlockedXor - -#endif // !defined(NO_INTERLOCKED_INTRINSICS) - -#endif // defined (_X86_) - -#if !defined (_WIN64) -/* - * PVOID - * InterlockedExchangePointer( - * IN OUT PVOID VOLATILE *Target, - * IN PVOID Value) - */ -#define InterlockedExchangePointer(Target, Value) \ - ((PVOID) InterlockedExchange((PLONG) Target, (LONG) Value)) - -/* - * PVOID - * InterlockedCompareExchangePointer( - * IN OUT PVOID *Destination, - * IN PVOID Exchange, - * IN PVOID Comparand) - */ -#define InterlockedCompareExchangePointer(Destination, Exchange, Comparand) \ - ((PVOID) InterlockedCompareExchange((PLONG) Destination, (LONG) Exchange, (LONG) Comparand)) - -#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b) -#define InterlockedIncrementSizeT(a) InterlockedIncrement((LONG *)a) -#define InterlockedDecrementSizeT(a) InterlockedDecrement((LONG *)a) - -#endif // !defined (_WIN64) - -#if defined (_M_AMD64) - -#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONGLONG *)a, (LONGLONG)b) -#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONGLONG *)a) -#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONGLONG *)a) -#define InterlockedAnd _InterlockedAnd -#define InterlockedOr _InterlockedOr -#define InterlockedXor _InterlockedXor -#define InterlockedIncrement _InterlockedIncrement -#define InterlockedDecrement _InterlockedDecrement -#define InterlockedAdd _InterlockedAdd -#define InterlockedExchange _InterlockedExchange -#define InterlockedExchangeAdd _InterlockedExchangeAdd -#define InterlockedCompareExchange _InterlockedCompareExchange -#define InterlockedAnd64 _InterlockedAnd64 -#define InterlockedOr64 _InterlockedOr64 -#define InterlockedXor64 _InterlockedXor64 -#define InterlockedIncrement64 _InterlockedIncrement64 -#define InterlockedDecrement64 _InterlockedDecrement64 -#define InterlockedAdd64 _InterlockedAdd64 -#define InterlockedExchange64 _InterlockedExchange64 -#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 -#define InterlockedCompareExchange64 _InterlockedCompareExchange64 -#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer -#define InterlockedExchangePointer _InterlockedExchangePointer - -#endif // _M_AMD64 - -#endif /* !__INTERLOCKED_DECLARED */ - - /** SPINLOCK FUNCTIONS ********************************************************/ NTKERNELAPI Modified: trunk/reactos/include/ddk/winnt4.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winnt4.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winnt4.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winnt4.h [iso-8859-1] Tue Feb 10 10:11:13 2009 @@ -140,12 +140,6 @@ IN PZONE_HEADER Zone, IN PVOID Object); -NTKERNELAPI -VOID -NTAPI -ExReleaseResource( - IN PERESOURCE Resource); - #define ExAcquireResourceExclusive ExAcquireResourceExclusiveLite #define ExAcquireResourceShared ExAcquireResourceSharedLite #define ExConvertExclusiveToShared ExConvertExclusiveToSharedLite
15 years, 10 months
1
0
0
0
[cwittich] 39532: set entrypoint="0"
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Feb 10 08:24:51 2009 New Revision: 39532 URL:
http://svn.reactos.org/svn/reactos?rev=39532&view=rev
Log: set entrypoint="0" Modified: trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild Modified: trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drm/drmk…
============================================================================== --- trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild [iso-8859-1] Tue Feb 10 08:24:51 2009 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../../../tools/rbuild/project.dtd"> -<module name="drmk" type="kernelmodedriver" installbase="system32/drivers" installname="drmk.sys"> +<module name="drmk" type="kernelmodedriver" installbase="system32/drivers" installname="drmk.sys" entrypoint="0"> <include base="drmk">.</include> <include base="drmk">..</include> <include base="drmk">../include</include>
15 years, 10 months
1
0
0
0
[dchapyshev] 39531: - Add SEH protection for FindResourceExW Notepad++ works now
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Tue Feb 10 08:08:05 2009 New Revision: 39531 URL:
http://svn.reactos.org/svn/reactos?rev=39531&view=rev
Log: - Add SEH protection for FindResourceExW Notepad++ works now Modified: trunk/reactos/dll/win32/kernel32/misc/res.c Modified: trunk/reactos/dll/win32/kernel32/misc/res.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/re…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/res.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/res.c [iso-8859-1] Tue Feb 10 08:08:05 2009 @@ -1197,21 +1197,30 @@ if ( hModule == NULL ) hModule = (HINSTANCE)GetModuleHandleW(NULL); - if ( !IS_INTRESOURCE(lpName) && lpName[0] == L'#' ) { - lpName = MAKEINTRESOURCEW(wcstoul(lpName + 1, NULL, 10)); + _SEH2_TRY + { + if ( !IS_INTRESOURCE(lpName) && lpName[0] == L'#' ) { + lpName = MAKEINTRESOURCEW(wcstoul(lpName + 1, NULL, 10)); + } + if ( !IS_INTRESOURCE(lpType) && lpType[0] == L'#' ) { + lpType = MAKEINTRESOURCEW(wcstoul(lpType + 1, NULL, 10)); + } + + ResourceInfo.Type = (ULONG)lpType; + ResourceInfo.Name = (ULONG)lpName; + ResourceInfo.Language = (ULONG)wLanguage; + + Status = LdrFindResource_U (hModule, + &ResourceInfo, + RESOURCE_DATA_LEVEL, + &ResourceDataEntry); } - if ( !IS_INTRESOURCE(lpType) && lpType[0] == L'#' ) { - lpType = MAKEINTRESOURCEW(wcstoul(lpType + 1, NULL, 10)); + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); } - - ResourceInfo.Type = (ULONG)lpType; - ResourceInfo.Name = (ULONG)lpName; - ResourceInfo.Language = (ULONG)wLanguage; - - Status = LdrFindResource_U (hModule, - &ResourceInfo, - RESOURCE_DATA_LEVEL, - &ResourceDataEntry); + _SEH2_END; + if (!NT_SUCCESS(Status)) { SetLastErrorByStatus (Status);
15 years, 10 months
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
56
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
Results per page:
10
25
50
100
200