Topic: [SOLVED] Is HAVE_THREAD_LS needed for Visual Studio?

Do you need HAVE_THREAD_LS if you're building wolfSSL for Visual Studio? What happens if you don't use it?

Share

Re: [SOLVED] Is HAVE_THREAD_LS needed for Visual Studio?

Hi raysatiro,

HAVE_THREAD_LS is not required for building wolfSSL for Visual Studio, but is optional.  What this does is use thread local storage for the ECC fixed point cache.  If HAVE_THREAD_LS is not defined, wolfSSL will instead use mutex locks around the ECC fixed point cache.

Best Regards,
Chris

Re: [SOLVED] Is HAVE_THREAD_LS needed for Visual Studio?

That sounds like it could help with performance if multiple threads are using wolfSSL. Is there any disadvantage to enabling it in Windows?

Share

Re: [SOLVED] Is HAVE_THREAD_LS needed for Visual Studio?

A possible disadvantage would be slightly higher stack use per thread, since you now have an ECC fixed point cache per thread, instead of one global cache.  The upside is that it may be more performant as you no longer have to lock/unlock mutexes on the cache.