File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 3737/* --- Local Variables -- */
3838/******************************************************************************/
3939
40-
41- #ifdef WOLFTPM_NO_ACTIVE_THREAD_LS
42- /* if using gHwLock and want to use a shared active TPM2_CTX between threads */
43- static TPM2_CTX * gActiveTPM ;
44- #else
45- static THREAD_LS_T TPM2_CTX * gActiveTPM ;
46- #endif
47-
4840#ifndef WOLFTPM2_NO_WOLFCRYPT
4941static volatile int gWolfCryptRefCount = 0 ;
5042#endif
5143
5244#if !defined(WOLFTPM2_NO_WOLFCRYPT ) && !defined(WOLFTPM_NO_LOCK ) && \
5345 !defined(SINGLE_THREADED )
46+ /* mutex protection enabled for gActiveTPM, so do not use thread local */
47+ static TPM2_CTX * gActiveTPM ;
48+
5449static wolfSSL_Mutex gHwLock WOLFSSL_MUTEX_INITIALIZER_CLAUSE (gHwLock );
50+ #else
51+ static THREAD_LS_T TPM2_CTX * gActiveTPM ;
5552#endif
5653
5754#ifdef WOLFTPM_LINUX_DEV
You can’t perform that action at this time.
0 commit comments