[ros-diffs] [akhaldi] 45699: Move alignment macros to wdm.h

akhaldi at svn.reactos.org akhaldi at svn.reactos.org
Sat Feb 27 15:59:21 CET 2010


Author: akhaldi
Date: Sat Feb 27 15:59:20 2010
New Revision: 45699

URL: http://svn.reactos.org/svn/reactos?rev=45699&view=rev
Log:
Move alignment macros to wdm.h

Modified:
    branches/header-work/include/ddk/wdm.h
    branches/header-work/include/ddk/winddk.h

Modified: branches/header-work/include/ddk/wdm.h
URL: http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?rev=45699&r1=45698&r2=45699&view=diff
==============================================================================
--- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Sat Feb 27 15:59:20 2010
@@ -54,6 +54,22 @@
 #endif
 
 #endif
+
+
+/*
+ * Alignment Macros
+ */
+#define ALIGN_DOWN(s, t) \
+    ((ULONG)(s) & ~(sizeof(t) - 1))
+
+#define ALIGN_UP(s, t) \
+    (ALIGN_DOWN(((ULONG)(s) + sizeof(t) - 1), t))
+
+#define ALIGN_DOWN_POINTER(p, t) \
+    ((PVOID)((ULONG_PTR)(p) & ~((ULONG_PTR)sizeof(t) - 1)))
+
+#define ALIGN_UP_POINTER(p, t) \
+    (ALIGN_DOWN_POINTER(((ULONG_PTR)(p) + sizeof(t) - 1), t))
 
 
 /* Simple types */

Modified: branches/header-work/include/ddk/winddk.h
URL: http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.h?rev=45699&r1=45698&r2=45699&view=diff
==============================================================================
--- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Sat Feb 27 15:59:20 2010
@@ -73,21 +73,6 @@
 # define _DDK_DUMMYUNION_MEMBER(name) name
 # define _DDK_DUMMYUNION_N_MEMBER(n, name) name
 #endif
-
-/*
- * Alignment Macros
- */
-#define ALIGN_DOWN(s, t) \
-    ((ULONG)(s) & ~(sizeof(t) - 1))
-
-#define ALIGN_UP(s, t) \
-    (ALIGN_DOWN(((ULONG)(s) + sizeof(t) - 1), t))
-
-#define ALIGN_DOWN_POINTER(p, t) \
-    ((PVOID)((ULONG_PTR)(p) & ~((ULONG_PTR)sizeof(t) - 1)))
-
-#define ALIGN_UP_POINTER(p, t) \
-    (ALIGN_DOWN_POINTER(((ULONG_PTR)(p) + sizeof(t) - 1), t))
 
 /*
  * GUID Comparison




More information about the Ros-diffs mailing list