зеркало из https://github.com/microsoft/CCF.git
Change static variables accessed concurrently to thread_local (#4980)
This commit is contained in:
Родитель
a44759fbc6
Коммит
eac45b5c4c
|
@ -57,7 +57,7 @@ namespace crypto
|
||||||
private:
|
private:
|
||||||
static int get_drng_support()
|
static int get_drng_support()
|
||||||
{
|
{
|
||||||
static int drng_features = -1;
|
thread_local int drng_features = -1;
|
||||||
|
|
||||||
/* So we don't call cpuid multiple times for the same information */
|
/* So we don't call cpuid multiple times for the same information */
|
||||||
if (drng_features == -1)
|
if (drng_features == -1)
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace ccf::pal
|
||||||
|
|
||||||
static bool is_intel_cpu()
|
static bool is_intel_cpu()
|
||||||
{
|
{
|
||||||
static int intel_cpu = -1;
|
thread_local int intel_cpu = -1;
|
||||||
|
|
||||||
if (intel_cpu == -1)
|
if (intel_cpu == -1)
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче