mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 19:45:44 +01:00
Added failure stub for uninitialized POLARSSL_THREADING_ALT functions
This commit is contained in:
parent
a8fd3e31ed
commit
c78c8422c2
@ -81,10 +81,16 @@ int (*polarssl_mutex_unlock)( threading_mutex_t * ) = threading_mutex_unlock_pth
|
|||||||
#endif /* POLARSSL_THREADING_PTHREAD */
|
#endif /* POLARSSL_THREADING_PTHREAD */
|
||||||
|
|
||||||
#if defined(POLARSSL_THREADING_ALT)
|
#if defined(POLARSSL_THREADING_ALT)
|
||||||
int (*polarssl_mutex_init)( threading_mutex_t * ) = NULL;
|
static int threading_mutex_fail( threading_mutex_t *mutex )
|
||||||
int (*polarssl_mutex_free)( threading_mutex_t * ) = NULL;
|
{
|
||||||
int (*polarssl_mutex_lock)( threading_mutex_t * ) = NULL;
|
((void) mutex );
|
||||||
int (*polarssl_mutex_unlock)( threading_mutex_t * ) = NULL;
|
return( POLARSSL_ERR_THREADING_BAD_INPUT_DATA );
|
||||||
|
}
|
||||||
|
|
||||||
|
int (*polarssl_mutex_init)( threading_mutex_t * ) = threading_mutex_fail;
|
||||||
|
int (*polarssl_mutex_free)( threading_mutex_t * ) = threading_mutex_fail;
|
||||||
|
int (*polarssl_mutex_lock)( threading_mutex_t * ) = threading_mutex_fail;
|
||||||
|
int (*polarssl_mutex_unlock)( threading_mutex_t * ) = threading_mutex_fail;
|
||||||
|
|
||||||
int threading_set_alt( int (*mutex_init)( threading_mutex_t * ),
|
int threading_set_alt( int (*mutex_init)( threading_mutex_t * ),
|
||||||
int (*mutex_free)( threading_mutex_t * ),
|
int (*mutex_free)( threading_mutex_t * ),
|
||||||
|
Loading…
Reference in New Issue
Block a user