Removed POLARSSL_THREADING_DUMMY option

This commit is contained in:
Paul Bakker 2013-12-31 11:54:08 +01:00
parent 4de44aa0ae
commit a8fd3e31ed
4 changed files with 3 additions and 57 deletions

View File

@ -20,6 +20,7 @@ Changes
* Split off curves from ecp.c into ecp_curves.c
* Curves are now stored fully in ROM
* Memory usage optimizations in ECP module
* Removed POLARSSL_THREADING_DUMMY
Bugfix
* Fixed bug in mpi_set_bit() on platforms where t_uint is wider than int

View File

@ -806,19 +806,6 @@
*/
//#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
*
@ -1709,8 +1696,8 @@
* This allows different threading implementations (self-implemented or
* provided).
*
* You will have to enable either POLARSSL_THREADING_ALT,
* POLARSSL_THREADING_PTHREAD or POLARSSL_THREADING_DUMMY.
* You will have to enable either POLARSSL_THREADING_ALT or
* POLARSSL_THREADING_PTHREAD.
*
* 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"
#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_C) || defined(POLARSSL_THREADING_IMPL)
#error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"

View File

@ -39,10 +39,6 @@ extern "C" {
#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. */
#if defined(POLARSSL_THREADING_DUMMY)
typedef void threading_mutex_t;
#endif
#if defined(POLARSSL_THREADING_PTHREAD)
#include <pthread.h>
typedef pthread_mutex_t threading_mutex_t;

View File

@ -29,37 +29,6 @@
#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)
static int threading_mutex_init_pthread( threading_mutex_t *mutex )
{