mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Mutex usage testing: set up wrapper functions
When using pthread mutexes (MBEDTLS_THREADING_C and MBEDTLS_THREADING_PTHREAD enabled), and when test hooks are enabled (MBEDTLS_TEST_HOOKS), set up wrappers around the mbedtls_mutex_xxx abstraction. In this commit, the wrapper functions don't do anything yet. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -260,4 +260,13 @@ void mbedtls_test_param_failed_reset_state( void );
|
||||
#include "test/fake_external_rng_for_test.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C) && defined(MBEDTLS_THREADING_PTHREAD) && \
|
||||
defined(MBEDTLS_TEST_HOOKS)
|
||||
#define MBEDTLS_TEST_MUTEX_USAGE
|
||||
|
||||
/** Permanently activate the mutex usage verification framework. See
|
||||
* threading_helpers.c for information. */
|
||||
void mbedtls_test_mutex_usage_init( void );
|
||||
#endif /* MBEDTLS_TEST_MUTEX_USAGE */
|
||||
|
||||
#endif /* TEST_HELPERS_H */
|
||||
|
Reference in New Issue
Block a user