Update to use thread_local

This commit is contained in:
Chey 2021-06-27 16:18:49 -04:00 committed by GitHub
parent 93beb1c83a
commit daec7df217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -254,7 +254,7 @@ void scrypt_detect_sse2()
void scrypt_1024_1_1_256(const char *input, char *output)
{
static char scratchpad[SCRYPT_SCRATCHPAD_SIZE];
thread_local char scratchpad[SCRYPT_SCRATCHPAD_SIZE];
memset(scratchpad, 0, sizeof(scratchpad));
scrypt_1024_1_1_256_sp(input, output, scratchpad);
}