Support for multi-threaded sniffer. Add support for atomic operations instead of mutex in wc_port.h.

This commit is contained in:
David Garske
2022-12-12 08:39:42 -08:00
parent b871829833
commit de22dbe61d
10 changed files with 775 additions and 232 deletions

View File

@@ -1061,8 +1061,7 @@ size_t wc_strlcat(char *dst, const char *src, size_t dstSize)
}
#endif /* USE_WOLF_STRLCAT */
#ifndef SINGLE_THREADED
/* TODO: use atomic operations instead of mutex */
#if !defined(SINGLE_THREADED) && !defined(HAVE_C___ATOMIC)
void wolfSSL_RefInit(wolfSSL_Ref* ref, int* err)
{
int ret = wc_InitMutex(&ref->mutex);