  void *IOThreadMain(void *myid) {
      /* The ID is the thread number (from 0 to server.iothreads_num-1), and is
       * used by the thread to just manipulate a single sub-array of clients. */
-@@ -2959,17 +2970,17 @@ void *IOThreadMain(void *myid) {
+@@ -3047,17 +3058,17 @@ void *IOThreadMain(void *myid) {
      while(1) {
          /* Wait for start */
          for (int j = 0; j < 1000000; j++) {
 -            if (io_threads_pending[id] != 0) break;
 +            if (getIOPendingCount(id) != 0) break;
          }
-
+ 
          /* Give the main thread a chance to stop this thread. */
 -        if (io_threads_pending[id] == 0) {
 +        if (getIOPendingCount(id) == 0) {

 PREFIX?=/usr/local
 INSTALL_BIN=$(PREFIX)/bin
 INSTALL=install
@@ -367,7 +377,7 @@ valgrind:
 	$(MAKE) OPTIMIZATION="-O0" MALLOC="libc"

 helgrind:
-	$(MAKE) OPTIMIZATION="-O0" MALLOC="libc" CFLAGS="-D__ATOMIC_VAR_FORCE_SYNC_MACROS"
+	$(MAKE) OPTIMIZATION="-O0" MALLOC="libc" CFLAGS="-D__ATOMIC_VAR_FORCE_SYNC_MACROS" REDIS_CFLAGS="-I/usr/local/include" REDIS_LDFLAGS="-L/usr/local/lib"

 src/help.h:
 	@../utils/generate-command-help.rb > help.h
diff --git a/src/atomicvar.h b/src/atomicvar.h
index ecd26ad7017..6ac04c60553 100644
--- a/src/atomicvar.h
+++ b/src/atomicvar.h
@@ -1,5 +1,5 @@

-    pthread_mutex_t updating_slots_mutex;
-    pthread_mutex_t slots_last_update_mutex;
 } config;
 
 typedef struct _client {
@@ -1617,13 +1611,8 @@ int main(int argc, const char **argv) {
     }
 
     if (config.num_threads > 0) {
-        pthread_mutex_init(&(config.requests_issued_mutex), NULL);
-        pthread_mutex_init(&(config.requests_finished_mutex), NULL);
