[ros-dev] [ros-diffs] [dgorbachev] 26483: Undo r26482 change, waste more stack space.

Alex Ionescu ionucu at videotron.ca
Tue Apr 24 07:44:01 CEST 2007


Perhaps you could try convincing the GCC folks to actually properly support declspec_align like MSVC does, instead of claiming to support it, but actually ignoring it. Then you could also convince them to support SEH, PDBs, STDCALL-default calling convention, etc ;)

-----Original Message-----
From: ros-diffs-bounces at reactos.org [mailto:ros-diffs-bounces at reactos.org] On Behalf Of dgorbachev at svn.reactos.org
Sent: April-24-07 1:06 AM
To: ros-diffs at reactos.org
Subject: [ros-diffs] [dgorbachev] 26483: Undo r26482 change, waste more stack space.

Author: dgorbachev
Date: Tue Apr 24 09:05:49 2007
New Revision: 26483

URL: http://svn.reactos.org/svn/reactos?rev=26483&view=rev
Log:
Undo r26482 change, waste more stack space.

Modified:
    trunk/reactos/ntoskrnl/include/internal/ex.h

Modified: trunk/reactos/ntoskrnl/include/internal/ex.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/ex.h?rev=26483&r1=26482&r2=26483&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ex.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ex.h Tue Apr 24 09:05:49 2007
@@ -106,9 +106,15 @@
 //
 #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 @@
 // 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




More information about the Ros-dev mailing list