List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:September 13 2010 8:00am
Subject:bzr commit into mysql-5.5-bugfixing branch (vvaintroub:3208) Bug#56585
View as plain text  
#At file:///H:/bzr-new/55bf/ based on revid:vvaintroub@stripped

 3208 Vladislav Vaintroub	2010-09-13
      Bug#56585 : use "int" instead of "volatile LONG" for reader_count.
      
      volatile LONG is the type used by InterlockedXXX operations and 
      those were removed in the latest patch. 
      
      Access to reader_count always happens inside critical sections, i.e 
      with memory barriers. Reordering by compiler is not possible either,
      so volatile is superfluous and is now removed. LONG is replaced
      by int for symmetric and aesthetic reasons.

    modified:
      include/my_pthread.h
=== modified file 'include/my_pthread.h'
--- a/include/my_pthread.h	2010-09-11 20:35:24 +0000
+++ b/include/my_pthread.h	2010-09-13 07:59:52 +0000
@@ -638,7 +638,7 @@ typedef struct _win_prlock
 {
   CRITICAL_SECTION reader_cs;
   CRITICAL_SECTION writer_cs;
-  volatile LONG reader_count; /*readers (all, pending and active) */
+  int  reader_count; /*readers (all, pending and active) */
   int  writer_recursion_count; /* recursion count for writer lock */
   HANDLE allow_writer;
 }rw_pr_lock_t;


Attachment: [text/bzr-bundle] bzr/vvaintroub@mysql.com-20100913075952-igfxmdq3rjg0ingf.bundle
Thread
bzr commit into mysql-5.5-bugfixing branch (vvaintroub:3208) Bug#56585Vladislav Vaintroub13 Sep