Clarified threading issues

This commit is contained in:
Paul Bakker 2013-09-30 13:56:38 +02:00
parent c9965dca27
commit 6838bd1d73
5 changed files with 8 additions and 1 deletions

View File

@ -674,6 +674,8 @@
* \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
*

View File

@ -88,6 +88,7 @@ int ecdsa_verify( ecp_group *grp,
/**
* \brief Compute ECDSA signature and write it to buffer,
* serialized as defined in RFC 4492 page 20.
* (Not thread-safe to use same context in multiple threads)
*
* \param ctx ECDSA context
* \param hash Message hash

View File

@ -450,6 +450,7 @@ int ecp_sub( const ecp_group *grp, ecp_point *R,
/**
* \brief Multiplication by an integer: R = m * P
* (Not thread-safe to use same group in multiple threads)
*
* \param grp ECP group
* \param R Destination point

View File

@ -789,6 +789,7 @@ int ssl_get_ciphersuite_id( const char *ciphersuite_name );
/**
* \brief Initialize an SSL context
* (An individual SSL context is not thread-safe)
*
* \param ssl SSL context
*

View File

@ -56,7 +56,7 @@ typedef pthread_mutex_t threading_mutex_t;
* \brief Set your alternate threading implementation function
* pointers
*
* \param mutex_init the malloc function implementation
* \param mutex_init the init function implementation
* \param mutex_free the free function implementation
* \param mutex_lock the lock function implementation
* \param mutex_unlock the unlock function implementation
@ -71,6 +71,8 @@ int threading_set_alt( int (*mutex_init)( threading_mutex_t * ),
/*
* The function pointers for mutex_init, mutex_free, mutex_ and mutex_unlock
*
* All these functions are expected to work or the result will be undefined.
*/
extern int (*polarssl_mutex_init)( threading_mutex_t *mutex );
extern int (*polarssl_mutex_free)( threading_mutex_t *mutex );