Browse Source

ZOOKEEPER-333. helgrind thread issues identified in mt c client code

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@752726 13f79535-47bb-0310-9956-ffa450edef68
Patrick D. Hunt 16 years ago
parent
commit
075d67b711
2 changed files with 6 additions and 3 deletions
  1. 4 1
      CHANGES.txt
  2. 2 2
      src/c/src/zk_adaptor.h

+ 4 - 1
CHANGES.txt

@@ -24,7 +24,10 @@ BUGFIXES:
   ZOOKEEPER-281. autoreconf fails for /zookeeper-3.0.1/src/c/ (phunt)
 
   ZOOKEEPER-318. remove locking in zk_hashtable.c or add locking in
-collect_keys() (chris darroch via mahadev)
+  collect_keys() (chris darroch via mahadev)
+
+  ZOOKEEPER-333. helgrind thread issues identified in mt c client code
+  (mahadev via phunt)
  
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.

+ 2 - 2
src/c/src/zk_adaptor.h

@@ -54,7 +54,7 @@ struct _buffer_list;
 struct _completion_list;
 
 typedef struct _buffer_head {
-    struct _buffer_list *head;
+    struct _buffer_list *volatile head;
     struct _buffer_list *last;
 #ifdef THREADED
     pthread_mutex_t lock;
@@ -62,7 +62,7 @@ typedef struct _buffer_head {
 } buffer_head_t;
 
 typedef struct _completion_head {
-    struct _completion_list *head;
+    struct _completion_list *volatile head;
     struct _completion_list *last;
 #ifdef THREADED
     pthread_cond_t cond;