]> pd.if.org Git - nbds/blobdiff - runtime/runtime.c
add hazard pointer implementation. buggy
[nbds] / runtime / runtime.c
index c41a1bdaa895364ee9440286de33315c31dacc98..14a09f9bb11f19b8a828ca1473c3681d0f9f3910 100644 (file)
@@ -5,7 +5,7 @@
 #include <pthread.h>
 #include "common.h"
 #include "runtime.h"
-#include "runtime_local.h"
+#include "rlocal.h"
 #include "mem.h"
 #include "tls.h"
 
@@ -18,7 +18,7 @@ typedef struct thread_info {
     void *restrict arg;
 } thread_info_t;
 
-void nbd_init (void) {
+__attribute__ ((constructor)) void nbd_init (void) {
     sranddev();
     INIT_THREAD_LOCAL(rand_seed_);
     INIT_THREAD_LOCAL(tid_);