Why the removal of the do/while loop?
This breaks the macro when used without braces :

+#define SepReleaseTokenLock(Token)                                             
\
+    ExReleaseResource(((PTOKEN)Token)->TokenLock);                             
\
+    KeLeaveCriticalRegion();                                                   
\
+

<snip>

-#define SepReleaseTokenLock(Token)                                             
\
-  do {                                                                         
\
-    ExReleaseResource(((PTOKEN)Token)->TokenLock);                             
\
-    KeLeaveCriticalRegion();                                                   
\
-  while(0)

<snip>

     /* Release the lock if we had acquired it */
+    if (!TokenLocked) SepReleaseTokenLock(Token);
 



_______________________________________________
Ros-dev mailing list
[email protected]
http://www.reactos.org/mailman/listinfo/ros-dev

Reply via email to