X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=runtime%2Fruntime.c;h=5f6b8d94d0965f85c3fa5c2166b3bd66afd515f1;hb=b5b2319678e1ac6a14a4af6f7d3b10ed91bd5921;hp=fe4a1bd894a6dc09d776ffbbb8276d1f7ce2605f;hpb=86fd9c8abfbacea2902b4fe42a8a4664b2a531cf;p=nbds diff --git a/runtime/runtime.c b/runtime/runtime.c index fe4a1bd..5f6b8d9 100644 --- a/runtime/runtime.c +++ b/runtime/runtime.c @@ -24,7 +24,7 @@ typedef struct thread_info { } thread_info_t; __attribute__ ((constructor)) void nbd_init (void) { - INIT_THREAD_LOCAL(r); + // INIT_THREAD_LOCAL(r); INIT_THREAD_LOCAL(tid_); SET_THREAD_LOCAL(tid_, 0); mem_init(); @@ -36,7 +36,7 @@ __attribute__ ((constructor)) void nbd_init (void) { static void *worker (void *arg) { thread_info_t *ti = (thread_info_t *)arg; SET_THREAD_LOCAL(tid_, ti->thread_id); - LOCALIZE_THREAD_LOCAL(tid_, int); + //LOCALIZE_THREAD_LOCAL(tid_, int); SET_THREAD_LOCAL(rx_, rand()); SET_THREAD_LOCAL(ry_, rand()); @@ -78,7 +78,7 @@ uint64_t nbd_rand (void) { SET_THREAD_LOCAL(rx_, rx); SET_THREAD_LOCAL(ry_, ry); SET_THREAD_LOCAL(rz_, rz); - SET_THREAD_LOCAL(rc_, t >> 32); + SET_THREAD_LOCAL(rc_, (unsigned)(t >> 32)); return r; }