mirror of
https://github.com/reactos/reactos.git
synced 2024-08-16 08:29:38 +00:00
Move alignment macros to wdm.h
svn path=/branches/header-work/; revision=45699
This commit is contained in:
parent
a61593425b
commit
a642218a45
|
@ -56,6 +56,22 @@ extern "C" {
|
|||
#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 */
|
||||
typedef UCHAR KPROCESSOR_MODE;
|
||||
typedef LONG KPRIORITY;
|
||||
|
|
|
@ -74,21 +74,6 @@ extern "C" {
|
|||
# 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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue