Author: tkreuzer
Date: Fri Oct 3 19:36:22 2014
New Revision: 64513
URL:
http://svn.reactos.org/svn/reactos?rev=64513&view=rev
Log:
[XDK/DDK/PSDK]
- Move FsRtl functions to fsrtlfuncs.h
- Improve formatting of a few macros
- Add missing NTKERNELAPI
- Add a "special" kind of "ASSERT" to ListEntry64To32
Modified:
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ddk/wdm.h
trunk/reactos/include/psdk/ntdef.h
trunk/reactos/include/xdk/fsrtlfuncs.h
trunk/reactos/include/xdk/iotypes.h
trunk/reactos/include/xdk/ntdef.template.h
trunk/reactos/include/xdk/rtltypes.h
Modified: trunk/reactos/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=64…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Fri Oct 3 19:36:22 2014
@@ -870,11 +870,11 @@
(NTAPI *PRTL_FREE_STRING_ROUTINE)(
_In_ __drv_freesMem(Mem) _Post_invalid_ PVOID Buffer);
-extern const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
-extern const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
+extern NTKERNELAPI const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
+extern NTKERNELAPI const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
#if _WIN32_WINNT >= 0x0600
-extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
+extern NTKERNELAPI const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
#endif
_Function_class_(RTL_HEAP_COMMIT_ROUTINE)
@@ -4917,26 +4917,6 @@
PFS_FILTER_COMPLETION_CALLBACK PostReleaseForModifiedPageWriter;
} FS_FILTER_CALLBACKS, *PFS_FILTER_CALLBACKS;
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlRegisterFileSystemFilterCallbacks(
- _In_ struct _DRIVER_OBJECT *FilterDriverObject,
- _In_ PFS_FILTER_CALLBACKS Callbacks);
-#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
-
-#if (NTDDI_VERSION >= NTDDI_VISTA)
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlNotifyStreamFileObject(
- _In_ struct _FILE_OBJECT * StreamFileObject,
- _In_opt_ struct _DEVICE_OBJECT *DeviceObjectHint,
- _In_ FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType,
- _In_ BOOLEAN SafeToRecurse);
-#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
-
extern NTKERNELAPI KSPIN_LOCK IoStatisticsLock;
extern NTKERNELAPI ULONG IoReadOperationCount;
extern NTKERNELAPI ULONG IoWriteOperationCount;
@@ -8372,24 +8352,40 @@
_In_opt_ PVOID OwnerId,
_In_opt_ PVOID InstanceId);
-#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) ( \
- FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11) \
-)
-
-#define FsRtlAreThereCurrentFileLocks(FL) ( \
- ((FL)->FastIoIsQuestionable) \
-)
-
-#define FsRtlIncrementLockRequestsInProgress(FL) { \
- ASSERT( (FL)->LockRequestsInProgress >= 0 ); \
- (void) \
- (InterlockedIncrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\
+NTKERNELAPI
+NTSTATUS
+NTAPI
+FsRtlRegisterFileSystemFilterCallbacks(
+ _In_ struct _DRIVER_OBJECT *FilterDriverObject,
+ _In_ PFS_FILTER_CALLBACKS Callbacks);
+
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+NTKERNELAPI
+NTSTATUS
+NTAPI
+FsRtlNotifyStreamFileObject(
+ _In_ struct _FILE_OBJECT * StreamFileObject,
+ _In_opt_ struct _DEVICE_OBJECT *DeviceObjectHint,
+ _In_ FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType,
+ _In_ BOOLEAN SafeToRecurse);
+#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
+
+#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) \
+ FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11)
+
+#define FsRtlAreThereCurrentFileLocks(FL) \
+ ((FL)->FastIoIsQuestionable)
+
+#define FsRtlIncrementLockRequestsInProgress(FL) { \
+ ASSERT((FL)->LockRequestsInProgress >= 0); \
+ (void) \
+ (InterlockedIncrement((LONG volatile *)&((FL)->LockRequestsInProgress))); \
}
-#define FsRtlDecrementLockRequestsInProgress(FL) { \
- ASSERT( (FL)->LockRequestsInProgress > 0 ); \
- (void) \
- (InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\
+#define FsRtlDecrementLockRequestsInProgress(FL) { \
+ ASSERT((FL)->LockRequestsInProgress > 0); \
+ (void) \
+ (InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress))); \
}
#ifdef _NTSYSTEM_
@@ -8401,97 +8397,81 @@
#define LEGAL_ANSI_CHARACTER_ARRAY (*FsRtlLegalAnsiCharacterArray)
#endif
-#define FsRtlIsAnsiCharacterWild(C) ( \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER ) \
-)
-
-#define FsRtlIsAnsiCharacterLegalFat(C, WILD) ( \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \
- ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
-)
-
-#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) ( \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \
- ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
-)
-
-#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) ( \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \
- ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
-)
-
-#define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK) ( \
- FsRtlTestAnsiCharacter((C), TRUE, (WILD_OK), FSRTL_NTFS_STREAM_LEGAL) \
-)
-
-#define FsRtlIsAnsiCharacterLegal(C,FLAGS) ( \
- FsRtlTestAnsiCharacter((C), TRUE, FALSE, (FLAGS)) \
-)
-
-#define FsRtlTestAnsiCharacter(C, DEFAULT_RET, WILD_OK, FLAGS) ( \
- ((SCHAR)(C) < 0) ? DEFAULT_RET : \
- FlagOn( LEGAL_ANSI_CHARACTER_ARRAY[(C)], \
- (FLAGS) | \
- ((WILD_OK) ? FSRTL_WILD_CHARACTER : 0) ) \
-)
-
-#define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) ( \
- (BOOLEAN)((UCHAR)(DBCS_CHAR) < 0x80 ? FALSE : \
- (NLS_MB_CODE_PAGE_TAG && \
- (NLS_OEM_LEAD_BYTE_INFO[(UCHAR)(DBCS_CHAR)] != 0))) \
-)
-
-#define FsRtlIsUnicodeCharacterWild(C) ( \
- (((C) >= 0x40) ? \
- FALSE : \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER )) \
-)
-
-#define FsRtlInitPerFileContext( _fc, _owner, _inst, _cb) \
- ((_fc)->OwnerId = (_owner), \
- (_fc)->InstanceId = (_inst), \
+#define FsRtlIsAnsiCharacterWild(C) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER)
+
+#define FsRtlIsAnsiCharacterLegalFat(C, WILD) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \
+ ((WILD) ? FSRTL_WILD_CHARACTER : 0 ))
+
+#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \
+ ((WILD) ? FSRTL_WILD_CHARACTER : 0 ))
+
+#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \
+ ((WILD) ? FSRTL_WILD_CHARACTER : 0 ))
+
+#define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK) \
+ FsRtlTestAnsiCharacter((C), TRUE, (WILD_OK), FSRTL_NTFS_STREAM_LEGAL)
+
+#define FsRtlIsAnsiCharacterLegal(C,FLAGS) \
+ FsRtlTestAnsiCharacter((C), TRUE, FALSE, (FLAGS))
+
+#define FsRtlTestAnsiCharacter(C, DEFAULT_RET, WILD_OK, FLAGS) \
+ (((SCHAR)(C) < 0) ? DEFAULT_RET : \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], \
+ (FLAGS) | ((WILD_OK) ? FSRTL_WILD_CHARACTER : 0)))
+
+#define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) \
+ ((BOOLEAN)((UCHAR)(DBCS_CHAR) < 0x80 ? FALSE : \
+ (NLS_MB_CODE_PAGE_TAG && \
+ (NLS_OEM_LEAD_BYTE_INFO[(UCHAR)(DBCS_CHAR)] != 0))))
+
+#define FsRtlIsUnicodeCharacterWild(C) \
+ ((((C) >= 0x40) ? FALSE : \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER )))
+
+#define FsRtlInitPerFileContext(_fc, _owner, _inst, _cb) \
+ ((_fc)->OwnerId = (_owner), \
+ (_fc)->InstanceId = (_inst), \
(_fc)->FreeCallback = (_cb))
-#define FsRtlGetPerFileContextPointer(_fo) \
- (FsRtlSupportsPerFileContexts(_fo) ? \
- FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer : \
- NULL)
-
-#define FsRtlSupportsPerFileContexts(_fo) \
- ((FsRtlGetPerStreamContextPointer(_fo) != NULL) && \
- (FsRtlGetPerStreamContextPointer(_fo)->Version >= FSRTL_FCB_HEADER_V1)
&& \
+#define FsRtlGetPerFileContextPointer(_fo) \
+ (FsRtlSupportsPerFileContexts(_fo) ? \
+ FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer : NULL)
+
+#define FsRtlSupportsPerFileContexts(_fo) \
+ ((FsRtlGetPerStreamContextPointer(_fo) != NULL) && \
+ (FsRtlGetPerStreamContextPointer(_fo)->Version >= FSRTL_FCB_HEADER_V1)
&& \
(FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer != NULL))
-#define FsRtlSetupAdvancedHeaderEx( _advhdr, _fmutx, _fctxptr ) \
-{ \
- FsRtlSetupAdvancedHeader( _advhdr, _fmutx ); \
- if ((_fctxptr) != NULL) { \
- (_advhdr)->FileContextSupportPointer = (_fctxptr); \
- } \
+#define FsRtlSetupAdvancedHeaderEx(_advhdr, _fmutx, _fctxptr) \
+{ \
+ FsRtlSetupAdvancedHeader( _advhdr, _fmutx ); \
+ if ((_fctxptr) != NULL) { \
+ (_advhdr)->FileContextSupportPointer = (_fctxptr); \
+ } \
}
-#define FsRtlGetPerStreamContextPointer(FO) ( \
- (PFSRTL_ADVANCED_FCB_HEADER)(FO)->FsContext \
-)
-
-#define FsRtlInitPerStreamContext(PSC, O, I, FC) ( \
- (PSC)->OwnerId = (O), \
- (PSC)->InstanceId = (I), \
- (PSC)->FreeCallback = (FC) \
-)
-
-#define FsRtlSupportsPerStreamContexts(FO) ( \
- (BOOLEAN)((NULL != FsRtlGetPerStreamContextPointer(FO) && \
- FlagOn(FsRtlGetPerStreamContextPointer(FO)->Flags2, \
- FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS)) \
-)
-
-#define FsRtlLookupPerStreamContext(_sc, _oid, _iid) \
- (((NULL != (_sc)) && \
- FlagOn((_sc)->Flags2,FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS) &&
\
- !IsListEmpty(&(_sc)->FilterContexts)) ? \
- FsRtlLookupPerStreamContextInternal((_sc), (_oid), (_iid)) : \
- NULL)
+#define FsRtlGetPerStreamContextPointer(FO) \
+ ((PFSRTL_ADVANCED_FCB_HEADER)(FO)->FsContext)
+
+#define FsRtlInitPerStreamContext(PSC, O, I, FC) \
+ ((PSC)->OwnerId = (O), \
+ (PSC)->InstanceId = (I), \
+ (PSC)->FreeCallback = (FC))
+
+#define FsRtlSupportsPerStreamContexts(FO) \
+ ((BOOLEAN)((NULL != FsRtlGetPerStreamContextPointer(FO) && \
+ FlagOn(FsRtlGetPerStreamContextPointer(FO)->Flags2, \
+ FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS)))
+
+#define FsRtlLookupPerStreamContext(_sc, _oid, _iid) \
+ (((NULL != (_sc)) && \
+ FlagOn((_sc)->Flags2,FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS) &&
\
+ !IsListEmpty(&(_sc)->FilterContexts)) ? \
+ FsRtlLookupPerStreamContextInternal((_sc), (_oid), (_iid)) : NULL)
_IRQL_requires_max_(APC_LEVEL)
FORCEINLINE
@@ -8520,12 +8500,12 @@
#endif
}
-#define FsRtlInitPerFileObjectContext(_fc, _owner, _inst) \
+#define FsRtlInitPerFileObjectContext(_fc, _owner, _inst) \
((_fc)->OwnerId = (_owner), (_fc)->InstanceId = (_inst))
-#define FsRtlCompleteRequest(IRP,STATUS) { \
- (IRP)->IoStatus.Status = (STATUS); \
- IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \
+#define FsRtlCompleteRequest(IRP, STATUS) { \
+ (IRP)->IoStatus.Status = (STATUS); \
+ IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \
}
/* Common Cache Types */
Modified: trunk/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=6451…
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Fri Oct 3 19:36:22 2014
@@ -16091,7 +16091,6 @@
ULONGLONG LastRecoveredLsn;
} TRANSACTIONMANAGER_RECOVERY_INFORMATION, *PTRANSACTIONMANAGER_RECOVERY_INFORMATION;
-
typedef struct _TRANSACTION_PROPERTIES_INFORMATION {
ULONG IsolationLevel;
ULONG IsolationFlags;
@@ -16140,7 +16139,7 @@
typedef struct _KTMOBJECT_CURSOR {
GUID LastQuery;
- unsigned long ObjectIdCount;
+ ULONG ObjectIdCount;
GUID ObjectIds[1];
} KTMOBJECT_CURSOR, *PKTMOBJECT_CURSOR;
@@ -16148,14 +16147,14 @@
TransactionBasicInformation,
TransactionPropertiesInformation,
TransactionEnlistmentInformation,
- TransactionSuperiorEnlistmentInformation,
+ TransactionSuperiorEnlistmentInformation
} TRANSACTION_INFORMATION_CLASS;
typedef enum _TRANSACTIONMANAGER_INFORMATION_CLASS {
TransactionManagerBasicInformation,
TransactionManagerLogInformation,
TransactionManagerLogPathInformation,
- TransactionManagerRecoveryInformation = 4,
+ TransactionManagerRecoveryInformation = 4
} TRANSACTIONMANAGER_INFORMATION_CLASS;
typedef enum _RESOURCEMANAGER_INFORMATION_CLASS {
Modified: trunk/reactos/include/psdk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=6…
==============================================================================
--- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Fri Oct 3 19:36:22 2014
@@ -1664,8 +1664,8 @@
_In_ PLIST_ENTRY32 ListEntry32,
_Out_ PLIST_ENTRY64 ListEntry64)
{
- ListEntry64->Flink = (ULONG)ListEntry32->Flink;
- ListEntry64->Blink = (ULONG)ListEntry32->Blink;
+ ListEntry64->Flink = ListEntry32->Flink;
+ ListEntry64->Blink = ListEntry32->Blink;
}
FORCEINLINE
@@ -1674,6 +1674,12 @@
_In_ PLIST_ENTRY64 ListEntry64,
_Out_ PLIST_ENTRY32 ListEntry32)
{
+ /* ASSERT without ASSERT or intrinsics ... */
+ if (((ListEntry64->Flink >> 32) != 0) ||
+ ((ListEntry64->Blink >> 32) != 0))
+ {
+ (VOID)*(volatile LONG*)(LONG_PTR)-1;
+ }
ListEntry32->Flink = ListEntry64->Flink & 0xFFFFFFFF;
ListEntry32->Blink = ListEntry64->Blink & 0xFFFFFFFF;
}
Modified: trunk/reactos/include/xdk/fsrtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/fsrtlfuncs.h?r…
==============================================================================
--- trunk/reactos/include/xdk/fsrtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/fsrtlfuncs.h [iso-8859-1] Fri Oct 3 19:36:22 2014
@@ -1560,24 +1560,40 @@
_In_opt_ PVOID OwnerId,
_In_opt_ PVOID InstanceId);
-#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) ( \
- FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11) \
-)
-
-#define FsRtlAreThereCurrentFileLocks(FL) ( \
- ((FL)->FastIoIsQuestionable) \
-)
-
-#define FsRtlIncrementLockRequestsInProgress(FL) { \
- ASSERT( (FL)->LockRequestsInProgress >= 0 ); \
- (void) \
- (InterlockedIncrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\
+NTKERNELAPI
+NTSTATUS
+NTAPI
+FsRtlRegisterFileSystemFilterCallbacks(
+ _In_ struct _DRIVER_OBJECT *FilterDriverObject,
+ _In_ PFS_FILTER_CALLBACKS Callbacks);
+
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+NTKERNELAPI
+NTSTATUS
+NTAPI
+FsRtlNotifyStreamFileObject(
+ _In_ struct _FILE_OBJECT * StreamFileObject,
+ _In_opt_ struct _DEVICE_OBJECT *DeviceObjectHint,
+ _In_ FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType,
+ _In_ BOOLEAN SafeToRecurse);
+#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
+
+#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) \
+ FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11)
+
+#define FsRtlAreThereCurrentFileLocks(FL) \
+ ((FL)->FastIoIsQuestionable)
+
+#define FsRtlIncrementLockRequestsInProgress(FL) { \
+ ASSERT((FL)->LockRequestsInProgress >= 0); \
+ (void) \
+ (InterlockedIncrement((LONG volatile *)&((FL)->LockRequestsInProgress))); \
}
-#define FsRtlDecrementLockRequestsInProgress(FL) { \
- ASSERT( (FL)->LockRequestsInProgress > 0 ); \
- (void) \
- (InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\
+#define FsRtlDecrementLockRequestsInProgress(FL) { \
+ ASSERT((FL)->LockRequestsInProgress > 0); \
+ (void) \
+ (InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress))); \
}
#ifdef _NTSYSTEM_
@@ -1589,97 +1605,81 @@
#define LEGAL_ANSI_CHARACTER_ARRAY (*FsRtlLegalAnsiCharacterArray)
#endif
-#define FsRtlIsAnsiCharacterWild(C) ( \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER ) \
-)
-
-#define FsRtlIsAnsiCharacterLegalFat(C, WILD) ( \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \
- ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
-)
-
-#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) ( \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \
- ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
-)
-
-#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) ( \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \
- ((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
-)
-
-#define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK) ( \
- FsRtlTestAnsiCharacter((C), TRUE, (WILD_OK), FSRTL_NTFS_STREAM_LEGAL) \
-)
-
-#define FsRtlIsAnsiCharacterLegal(C,FLAGS) ( \
- FsRtlTestAnsiCharacter((C), TRUE, FALSE, (FLAGS)) \
-)
-
-#define FsRtlTestAnsiCharacter(C, DEFAULT_RET, WILD_OK, FLAGS) ( \
- ((SCHAR)(C) < 0) ? DEFAULT_RET : \
- FlagOn( LEGAL_ANSI_CHARACTER_ARRAY[(C)], \
- (FLAGS) | \
- ((WILD_OK) ? FSRTL_WILD_CHARACTER : 0) ) \
-)
-
-#define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) ( \
- (BOOLEAN)((UCHAR)(DBCS_CHAR) < 0x80 ? FALSE : \
- (NLS_MB_CODE_PAGE_TAG && \
- (NLS_OEM_LEAD_BYTE_INFO[(UCHAR)(DBCS_CHAR)] != 0))) \
-)
-
-#define FsRtlIsUnicodeCharacterWild(C) ( \
- (((C) >= 0x40) ? \
- FALSE : \
- FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER )) \
-)
-
-#define FsRtlInitPerFileContext( _fc, _owner, _inst, _cb) \
- ((_fc)->OwnerId = (_owner), \
- (_fc)->InstanceId = (_inst), \
+#define FsRtlIsAnsiCharacterWild(C) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER)
+
+#define FsRtlIsAnsiCharacterLegalFat(C, WILD) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \
+ ((WILD) ? FSRTL_WILD_CHARACTER : 0 ))
+
+#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \
+ ((WILD) ? FSRTL_WILD_CHARACTER : 0 ))
+
+#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \
+ ((WILD) ? FSRTL_WILD_CHARACTER : 0 ))
+
+#define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK) \
+ FsRtlTestAnsiCharacter((C), TRUE, (WILD_OK), FSRTL_NTFS_STREAM_LEGAL)
+
+#define FsRtlIsAnsiCharacterLegal(C,FLAGS) \
+ FsRtlTestAnsiCharacter((C), TRUE, FALSE, (FLAGS))
+
+#define FsRtlTestAnsiCharacter(C, DEFAULT_RET, WILD_OK, FLAGS) \
+ (((SCHAR)(C) < 0) ? DEFAULT_RET : \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], \
+ (FLAGS) | ((WILD_OK) ? FSRTL_WILD_CHARACTER : 0)))
+
+#define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) \
+ ((BOOLEAN)((UCHAR)(DBCS_CHAR) < 0x80 ? FALSE : \
+ (NLS_MB_CODE_PAGE_TAG && \
+ (NLS_OEM_LEAD_BYTE_INFO[(UCHAR)(DBCS_CHAR)] != 0))))
+
+#define FsRtlIsUnicodeCharacterWild(C) \
+ ((((C) >= 0x40) ? FALSE : \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER )))
+
+#define FsRtlInitPerFileContext(_fc, _owner, _inst, _cb) \
+ ((_fc)->OwnerId = (_owner), \
+ (_fc)->InstanceId = (_inst), \
(_fc)->FreeCallback = (_cb))
-#define FsRtlGetPerFileContextPointer(_fo) \
- (FsRtlSupportsPerFileContexts(_fo) ? \
- FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer : \
- NULL)
-
-#define FsRtlSupportsPerFileContexts(_fo) \
- ((FsRtlGetPerStreamContextPointer(_fo) != NULL) && \
- (FsRtlGetPerStreamContextPointer(_fo)->Version >= FSRTL_FCB_HEADER_V1)
&& \
+#define FsRtlGetPerFileContextPointer(_fo) \
+ (FsRtlSupportsPerFileContexts(_fo) ? \
+ FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer : NULL)
+
+#define FsRtlSupportsPerFileContexts(_fo) \
+ ((FsRtlGetPerStreamContextPointer(_fo) != NULL) && \
+ (FsRtlGetPerStreamContextPointer(_fo)->Version >= FSRTL_FCB_HEADER_V1)
&& \
(FsRtlGetPerStreamContextPointer(_fo)->FileContextSupportPointer != NULL))
-#define FsRtlSetupAdvancedHeaderEx( _advhdr, _fmutx, _fctxptr ) \
-{ \
- FsRtlSetupAdvancedHeader( _advhdr, _fmutx ); \
- if ((_fctxptr) != NULL) { \
- (_advhdr)->FileContextSupportPointer = (_fctxptr); \
- } \
+#define FsRtlSetupAdvancedHeaderEx(_advhdr, _fmutx, _fctxptr) \
+{ \
+ FsRtlSetupAdvancedHeader( _advhdr, _fmutx ); \
+ if ((_fctxptr) != NULL) { \
+ (_advhdr)->FileContextSupportPointer = (_fctxptr); \
+ } \
}
-#define FsRtlGetPerStreamContextPointer(FO) ( \
- (PFSRTL_ADVANCED_FCB_HEADER)(FO)->FsContext \
-)
-
-#define FsRtlInitPerStreamContext(PSC, O, I, FC) ( \
- (PSC)->OwnerId = (O), \
- (PSC)->InstanceId = (I), \
- (PSC)->FreeCallback = (FC) \
-)
-
-#define FsRtlSupportsPerStreamContexts(FO) ( \
- (BOOLEAN)((NULL != FsRtlGetPerStreamContextPointer(FO) && \
- FlagOn(FsRtlGetPerStreamContextPointer(FO)->Flags2, \
- FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS)) \
-)
-
-#define FsRtlLookupPerStreamContext(_sc, _oid, _iid) \
- (((NULL != (_sc)) && \
- FlagOn((_sc)->Flags2,FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS) &&
\
- !IsListEmpty(&(_sc)->FilterContexts)) ? \
- FsRtlLookupPerStreamContextInternal((_sc), (_oid), (_iid)) : \
- NULL)
+#define FsRtlGetPerStreamContextPointer(FO) \
+ ((PFSRTL_ADVANCED_FCB_HEADER)(FO)->FsContext)
+
+#define FsRtlInitPerStreamContext(PSC, O, I, FC) \
+ ((PSC)->OwnerId = (O), \
+ (PSC)->InstanceId = (I), \
+ (PSC)->FreeCallback = (FC))
+
+#define FsRtlSupportsPerStreamContexts(FO) \
+ ((BOOLEAN)((NULL != FsRtlGetPerStreamContextPointer(FO) && \
+ FlagOn(FsRtlGetPerStreamContextPointer(FO)->Flags2, \
+ FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS)))
+
+#define FsRtlLookupPerStreamContext(_sc, _oid, _iid) \
+ (((NULL != (_sc)) && \
+ FlagOn((_sc)->Flags2,FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS) &&
\
+ !IsListEmpty(&(_sc)->FilterContexts)) ? \
+ FsRtlLookupPerStreamContextInternal((_sc), (_oid), (_iid)) : NULL)
_IRQL_requires_max_(APC_LEVEL)
FORCEINLINE
@@ -1708,11 +1708,11 @@
#endif
}
-#define FsRtlInitPerFileObjectContext(_fc, _owner, _inst) \
+#define FsRtlInitPerFileObjectContext(_fc, _owner, _inst) \
((_fc)->OwnerId = (_owner), (_fc)->InstanceId = (_inst))
-#define FsRtlCompleteRequest(IRP,STATUS) { \
- (IRP)->IoStatus.Status = (STATUS); \
- IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \
+#define FsRtlCompleteRequest(IRP, STATUS) { \
+ (IRP)->IoStatus.Status = (STATUS); \
+ IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \
}
$endif (_NTIFS_)
Modified: trunk/reactos/include/xdk/iotypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/iotypes.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/iotypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/iotypes.h [iso-8859-1] Fri Oct 3 19:36:22 2014
@@ -7017,26 +7017,6 @@
PFS_FILTER_COMPLETION_CALLBACK PostReleaseForModifiedPageWriter;
} FS_FILTER_CALLBACKS, *PFS_FILTER_CALLBACKS;
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlRegisterFileSystemFilterCallbacks(
- _In_ struct _DRIVER_OBJECT *FilterDriverObject,
- _In_ PFS_FILTER_CALLBACKS Callbacks);
-#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
-
-#if (NTDDI_VERSION >= NTDDI_VISTA)
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlNotifyStreamFileObject(
- _In_ struct _FILE_OBJECT * StreamFileObject,
- _In_opt_ struct _DEVICE_OBJECT *DeviceObjectHint,
- _In_ FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType,
- _In_ BOOLEAN SafeToRecurse);
-#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
-
extern NTKERNELAPI KSPIN_LOCK IoStatisticsLock;
extern NTKERNELAPI ULONG IoReadOperationCount;
extern NTKERNELAPI ULONG IoWriteOperationCount;
Modified: trunk/reactos/include/xdk/ntdef.template.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ntdef.template…
==============================================================================
--- trunk/reactos/include/xdk/ntdef.template.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/ntdef.template.h [iso-8859-1] Fri Oct 3 19:36:22 2014
@@ -364,8 +364,8 @@
_In_ PLIST_ENTRY32 ListEntry32,
_Out_ PLIST_ENTRY64 ListEntry64)
{
- ListEntry64->Flink = (ULONG)ListEntry32->Flink;
- ListEntry64->Blink = (ULONG)ListEntry32->Blink;
+ ListEntry64->Flink = ListEntry32->Flink;
+ ListEntry64->Blink = ListEntry32->Blink;
}
FORCEINLINE
@@ -374,6 +374,12 @@
_In_ PLIST_ENTRY64 ListEntry64,
_Out_ PLIST_ENTRY32 ListEntry32)
{
+ /* ASSERT without ASSERT or intrinsics ... */
+ if (((ListEntry64->Flink >> 32) != 0) ||
+ ((ListEntry64->Blink >> 32) != 0))
+ {
+ (VOID)*(volatile LONG*)(LONG_PTR)-1;
+ }
ListEntry32->Flink = ListEntry64->Flink & 0xFFFFFFFF;
ListEntry32->Blink = ListEntry64->Blink & 0xFFFFFFFF;
}
Modified: trunk/reactos/include/xdk/rtltypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/rtltypes.h?rev…
==============================================================================
--- trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] Fri Oct 3 19:36:22 2014
@@ -559,11 +559,11 @@
(NTAPI *PRTL_FREE_STRING_ROUTINE)(
_In_ __drv_freesMem(Mem) _Post_invalid_ PVOID Buffer);
-extern const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
-extern const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
+extern NTKERNELAPI const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
+extern NTKERNELAPI const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
#if _WIN32_WINNT >= 0x0600
-extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
+extern NTKERNELAPI const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
#endif
_Function_class_(RTL_HEAP_COMMIT_ROUTINE)