commit
a0b02236b8
@ -652,7 +652,33 @@ int UnLockMutex(wolfSSL_Mutex *m)
|
||||
return ;
|
||||
}
|
||||
}
|
||||
#elif defined (WOLFSSL_FROSTED)
|
||||
int InitMutex(wolfSSL_Mutex* m)
|
||||
{
|
||||
*m = mutex_init();
|
||||
if (*m)
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
int FreeMutex(wolfSSL_Mutex* m)
|
||||
{
|
||||
mutex_destroy(*m);
|
||||
return(0) ;
|
||||
}
|
||||
|
||||
int LockMutex(wolfSSL_Mutex* m)
|
||||
{
|
||||
mutex_lock(*m);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int UnLockMutex(wolfSSL_Mutex* m)
|
||||
{
|
||||
mutex_unlock(*m);
|
||||
return 0;
|
||||
}
|
||||
#elif defined(WOLFSSL_MDK_ARM)|| defined(WOLFSSL_CMSIS_RTOS)
|
||||
|
||||
#if defined(WOLFSSL_CMSIS_RTOS)
|
||||
|
@ -73,6 +73,8 @@
|
||||
#elif defined(WOLFSSL_TIRTOS)
|
||||
#include <ti/sysbios/BIOS.h>
|
||||
#include <ti/sysbios/knl/Semaphore.h>
|
||||
#elif defined(WOLFSSL_FROSTED)
|
||||
#include <semaphore.h>
|
||||
#else
|
||||
#ifndef SINGLE_THREADED
|
||||
#define WOLFSSL_PTHREADS
|
||||
@ -133,6 +135,8 @@
|
||||
typedef osMutexId wolfSSL_Mutex;
|
||||
#elif defined(WOLFSSL_TIRTOS)
|
||||
typedef ti_sysbios_knl_Semaphore_Handle wolfSSL_Mutex;
|
||||
#elif defined(WOLFSSL_FROSTED)
|
||||
typedef mutex_t * wolfSSL_Mutex;
|
||||
#else
|
||||
#error Need a mutex type in multithreaded mode
|
||||
#endif /* USE_WINDOWS_API */
|
||||
|
Loading…
x
Reference in New Issue
Block a user