X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=include%2Fruntime.h;h=ff1d245f3f526663351e72c3804c752e20187a54;hb=5aa9223647fbb52fa8941d92c8896ebaf148b41c;hp=9ba7657d92f5d800bcc4381ff98ea177643706f9;hpb=052506ff082f134f00834f666653819e18d9bddf;p=nbds diff --git a/include/runtime.h b/include/runtime.h index 9ba7657..ff1d245 100644 --- a/include/runtime.h +++ b/include/runtime.h @@ -2,12 +2,17 @@ * 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 + +#include +#include "tls.h" + +extern DECLARE_THREAD_LOCAL(tid_, int); -void nbd_init (void); int nbd_thread_create (pthread_t *restrict thread, int thread_id, void *(*start_routine)(void *), void *restrict arg); int nbd_rand (void); -void rcu_update (void); +uint64_t nbd_rand_seed (int i); +int nbd_next_rand (uint64_t *r); -#endif//THREADS_H +#endif//RUNTIME_H