]> pd.if.org Git - nbds/blobdiff - include/runtime.h
pad struct to improve hazard performance, fix off-by-one error
[nbds] / include / runtime.h
index 8d9638ea055008b9182ca5bb1dd7ea76fe5323c4..5a87c883b248c490096474701be66c2343301c02 100644 (file)
@@ -2,13 +2,14 @@
  * Written by Josh Dybnis and released to the public domain, as explained at
  * http://creativecommons.org/licenses/publicdomain
  */
-#ifndef THREADS_H
-#define THREADS_H
+#ifndef RUNTIME_H
+#define RUNTIME_H
 
-void nbd_init (void);
+#include "tls.h"
 
-int nbd_thread_create (pthread_t *restrict thread, int thread_id, void *(*start_routine)(void *), void *restrict arg);
+extern DECLARE_THREAD_LOCAL(tid_, int);
 
-void rcu_update (void);
+int nbd_thread_create (pthread_t *restrict thread, int thread_id, void *(*start_routine)(void *), void *restrict arg);
+int nbd_rand (void);
 
-#endif//THREADS_H
+#endif//RUNTIME_H