From 95e9806e9ef482bd32f1a437c4c64e02d7601e69 Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Wed, 8 May 2024 06:56:43 +0900 Subject: [PATCH 1/2] add user threading macro definition --- wolfssl/wolfcrypt/types.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index f5a279febb..567ff95f46 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -1400,6 +1400,20 @@ typedef struct w64wrapper { #endif typedef void* THREAD_TYPE; #define WOLFSSL_THREAD + #elif defined(WOLFSSL_USER_THREADING) + /* User can define user specific threading types + * THREAD_RETURN + * TREAD_TYPE + * WOLFSSL_THREAD + * e.g. + * typedef unsigned int THREAD_RETURN; + * typedef size_t THREAD_TYPE; + * #define WOLFSSL_THREAD void + * + * User can aslo implement user own wolfSSL_NewThread(), + * wolfSSL_JoinThread() and CND(s) if want. + * Otherwise, those functions are omitted. + */ #elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET) || \ defined(FREESCALE_MQX) typedef unsigned int THREAD_RETURN; From 5ceb99203579bb183c75818d6c4db8e7e578ec62 Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Thu, 9 May 2024 07:05:51 +0900 Subject: [PATCH 2/2] address review comments --- wolfssl/wolfcrypt/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 567ff95f46..6e3f3b406b 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -1410,8 +1410,8 @@ typedef struct w64wrapper { * typedef size_t THREAD_TYPE; * #define WOLFSSL_THREAD void * - * User can aslo implement user own wolfSSL_NewThread(), - * wolfSSL_JoinThread() and CND(s) if want. + * User can also implement their own wolfSSL_NewThread(), + * wolfSSL_JoinThread() and wolfSSL_Cond signaling if they want. * Otherwise, those functions are omitted. */ #elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET) || \