From f0f64567fa4e7bf17594ce4dbdd1bb8983ebf225 Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Tue, 24 Apr 2007 05:05:49 +0000 Subject: [PATCH] Undo r26482 change, waste more stack space. svn path=/trunk/; revision=26483 --- reactos/ntoskrnl/include/internal/ex.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/ex.h b/reactos/ntoskrnl/include/internal/ex.h index 696278293f9..3d9287b0e8e 100644 --- a/reactos/ntoskrnl/include/internal/ex.h +++ b/reactos/ntoskrnl/include/internal/ex.h @@ -106,9 +106,15 @@ typedef struct // #ifdef __GNUC__ -#define DEFINE_WAIT_BLOCK(x) \ - PEX_PUSH_LOCK_WAIT_BLOCK x = __builtin_alloca(sizeof(EX_PUSH_LOCK_WAIT_BLOCK)); - +#define DEFINE_WAIT_BLOCK(x) \ + struct _AlignHack \ + { \ + UCHAR Hack[15]; \ + EX_PUSH_LOCK_WAIT_BLOCK UnalignedBlock; \ + } WaitBlockBuffer; \ + PEX_PUSH_LOCK_WAIT_BLOCK x = (PEX_PUSH_LOCK_WAIT_BLOCK) \ + ((ULONG_PTR)&WaitBlockBuffer.UnalignedBlock &~ 0xF); + #else // @@ -116,8 +122,8 @@ typedef struct // local variable (the actual pointer) away, so we don't take any perf hit // by doing this. // -#define DEFINE_WAIT_BLOCK(x) \ - EX_PUSH_LOCK_WAIT_BLOCK WaitBlockBuffer; \ +#define DEFINE_WAIT_BLOCK(x) \ + EX_PUSH_LOCK_WAIT_BLOCK WaitBlockBuffer; \ PEX_PUSH_LOCK_WAIT_BLOCK x = &WaitBlockBuffer; #endif