浏览代码

enable the thread destructor

Ioannis Koutras 11 年之前
父节点
当前提交
87c9a8d69f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/tls_allocator.c

+ 1 - 1
src/tls_allocator.c

@@ -24,6 +24,6 @@ void get_tls_allocator(void) {
         }
         }
         pthread_key_create(&destruction_key,
         pthread_key_create(&destruction_key,
                 (void (*)(void *)) push_to_destructed_list);
                 (void (*)(void *)) push_to_destructed_list);
-        pthread_setspecific(destruction_key, NULL);
+        pthread_setspecific(destruction_key, (void *) 1);
     }
     }
 }
 }