diff --git a/bernoulli.h b/bernoulli.h index 04809083..3c2a6886 100644 --- a/bernoulli.h +++ b/bernoulli.h @@ -34,9 +34,9 @@ #include "arith.h" #include "fmprb.h" -extern long bernoulli_cache_num; +extern long __thread bernoulli_cache_num; -extern fmpq * bernoulli_cache; +extern __thread fmpq * bernoulli_cache; void bernoulli_cache_compute(long n); diff --git a/bernoulli/cache_compute.c b/bernoulli/cache_compute.c index b064beac..7df3c1d0 100644 --- a/bernoulli/cache_compute.c +++ b/bernoulli/cache_compute.c @@ -25,9 +25,9 @@ #include "bernoulli.h" -long bernoulli_cache_num = 0; +__thread long bernoulli_cache_num = 0; -fmpq * bernoulli_cache = NULL; +__thread fmpq * bernoulli_cache = NULL; void bernoulli_cache_compute(long n)