mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 11:55:42 +01:00
Removed POLARSSL_THREADING_DUMMY option
This commit is contained in:
parent
4de44aa0ae
commit
a8fd3e31ed
@ -20,6 +20,7 @@ Changes
|
|||||||
* Split off curves from ecp.c into ecp_curves.c
|
* Split off curves from ecp.c into ecp_curves.c
|
||||||
* Curves are now stored fully in ROM
|
* Curves are now stored fully in ROM
|
||||||
* Memory usage optimizations in ECP module
|
* Memory usage optimizations in ECP module
|
||||||
|
* Removed POLARSSL_THREADING_DUMMY
|
||||||
|
|
||||||
Bugfix
|
Bugfix
|
||||||
* Fixed bug in mpi_set_bit() on platforms where t_uint is wider than int
|
* Fixed bug in mpi_set_bit() on platforms where t_uint is wider than int
|
||||||
|
@ -806,19 +806,6 @@
|
|||||||
*/
|
*/
|
||||||
//#define POLARSSL_THREADING_ALT
|
//#define POLARSSL_THREADING_ALT
|
||||||
|
|
||||||
/**
|
|
||||||
* \def POLARSSL_THREADING_DUMMY
|
|
||||||
*
|
|
||||||
* Provide a dummy threading implementation.
|
|
||||||
* Warning: If you use this, all claims of thread-safety in the documentation
|
|
||||||
* are void!
|
|
||||||
*
|
|
||||||
* Requires: POLARSSL_THREADING_C
|
|
||||||
*
|
|
||||||
* Uncomment this to enable code to compile like with threading enabled
|
|
||||||
*/
|
|
||||||
//#define POLARSSL_THREADING_DUMMY
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def POLARSSL_THREADING_PTHREAD
|
* \def POLARSSL_THREADING_PTHREAD
|
||||||
*
|
*
|
||||||
@ -1709,8 +1696,8 @@
|
|||||||
* This allows different threading implementations (self-implemented or
|
* This allows different threading implementations (self-implemented or
|
||||||
* provided).
|
* provided).
|
||||||
*
|
*
|
||||||
* You will have to enable either POLARSSL_THREADING_ALT,
|
* You will have to enable either POLARSSL_THREADING_ALT or
|
||||||
* POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
|
* POLARSSL_THREADING_PTHREAD.
|
||||||
*
|
*
|
||||||
* Enable this layer to allow use of mutexes within PolarSSL
|
* Enable this layer to allow use of mutexes within PolarSSL
|
||||||
*/
|
*/
|
||||||
@ -2127,13 +2114,6 @@
|
|||||||
#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
|
#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(POLARSSL_THREADING_DUMMY)
|
|
||||||
#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
|
|
||||||
#error "POLARSSL_THREADING_DUMMY defined, but not all prerequisites"
|
|
||||||
#endif
|
|
||||||
#define POLARSSL_THREADING_IMPL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(POLARSSL_THREADING_PTHREAD)
|
#if defined(POLARSSL_THREADING_PTHREAD)
|
||||||
#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
|
#if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
|
||||||
#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
|
#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
|
||||||
|
@ -39,10 +39,6 @@ extern "C" {
|
|||||||
#define POLARSSL_ERR_THREADING_BAD_INPUT_DATA -0x001C /**< Bad input parameters to function. */
|
#define POLARSSL_ERR_THREADING_BAD_INPUT_DATA -0x001C /**< Bad input parameters to function. */
|
||||||
#define POLARSSL_ERR_THREADING_MUTEX_ERROR -0x001E /**< Locking / unlocking / free failed with error code. */
|
#define POLARSSL_ERR_THREADING_MUTEX_ERROR -0x001E /**< Locking / unlocking / free failed with error code. */
|
||||||
|
|
||||||
#if defined(POLARSSL_THREADING_DUMMY)
|
|
||||||
typedef void threading_mutex_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(POLARSSL_THREADING_PTHREAD)
|
#if defined(POLARSSL_THREADING_PTHREAD)
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
typedef pthread_mutex_t threading_mutex_t;
|
typedef pthread_mutex_t threading_mutex_t;
|
||||||
|
@ -29,37 +29,6 @@
|
|||||||
|
|
||||||
#include "polarssl/threading.h"
|
#include "polarssl/threading.h"
|
||||||
|
|
||||||
#if defined(POLARSSL_THREADING_DUMMY)
|
|
||||||
static int threading_mutex_init_dummy( threading_mutex_t *mutex )
|
|
||||||
{
|
|
||||||
((void) mutex );
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
static int threading_mutex_free_dummy( threading_mutex_t *mutex )
|
|
||||||
{
|
|
||||||
((void) mutex );
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
static int threading_mutex_lock_dummy( threading_mutex_t *mutex )
|
|
||||||
{
|
|
||||||
((void) mutex );
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
static int threading_mutex_unlock_dummy( threading_mutex_t *mutex )
|
|
||||||
{
|
|
||||||
((void) mutex );
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
int (*polarssl_mutex_init)( threading_mutex_t * ) = threading_mutex_init_dummy;
|
|
||||||
int (*polarssl_mutex_free)( threading_mutex_t * ) = threading_mutex_free_dummy;
|
|
||||||
int (*polarssl_mutex_lock)( threading_mutex_t * ) = threading_mutex_lock_dummy;
|
|
||||||
int (*polarssl_mutex_unlock)( threading_mutex_t * ) = threading_mutex_unlock_dummy;
|
|
||||||
#endif /* POLARSSL_THREADING_DUMMY */
|
|
||||||
|
|
||||||
#if defined(POLARSSL_THREADING_PTHREAD)
|
#if defined(POLARSSL_THREADING_PTHREAD)
|
||||||
static int threading_mutex_init_pthread( threading_mutex_t *mutex )
|
static int threading_mutex_init_pthread( threading_mutex_t *mutex )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user