Topic: What is Single Threaded?

Hello,
Yes, I know what Single Threaded is...

But what does it do in this case?  The doc says it's only used for a session cache.   Assuming the doc is still correct in this case.
Where is that mutex defined?

Reason:  I was given a tutorial (very old) that indicated it was using pthreads...   I am building for TI_RTOS (SysBios) and using tasks.
TI's SysBios tasks and mutexes are nothing like POSIX.

And we are using tasks, so it is "multi-threaded".

So if I turn on SINGLE_THREADED, what damage could it cause?  Or will it properly use atomic mutexes compatible with SysBios if I turn SINGLE_THREADED off?

-Scott
<Code shown is not to scale>

Share

Re: What is Single Threaded?

We have an abstraction layer for mutexes in wolfcrypt/src/wc_port.c. With SINGLE_THREADED this abstraction just returns success when requesting the mutex. It can be replaced with RTOS specific mechanisms and for TIRTOS we are using a semaphore.

The worst thing that'll happen is two server sessions overwriting the same entry in the session cache. (Or the ECC look up table, or the CRL and OCSP response lists, etc.) If you disable the session cache, and don't enable FP_ECC and CRL, I think you're fine with SINGLE_THREADED.

Re: What is Single Threaded?

Okay.  At line 1317 I see that is does import the TI_RTOS SysBios mutex  (not POSIX).

So I figure it is handling multi threaded cleanly in this case.

Thanks.

-Scott
<Code shown is not to scale>

Share