mirror of
				https://github.com/Mbed-TLS/mbedtls.git
				synced 2025-11-03 20:33:16 +03:00 
			
		
		
		
	Switch to the new code style
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
		@@ -38,8 +38,7 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
#if defined(MBEDTLS_THREADING_PTHREAD)
 | 
			
		||||
#include <pthread.h>
 | 
			
		||||
typedef struct mbedtls_threading_mutex_t
 | 
			
		||||
{
 | 
			
		||||
typedef struct mbedtls_threading_mutex_t {
 | 
			
		||||
    pthread_mutex_t MBEDTLS_PRIVATE(mutex);
 | 
			
		||||
    /* is_valid is 0 after a failed init or a free, and nonzero after a
 | 
			
		||||
     * successful init. This field is not considered part of the public
 | 
			
		||||
@@ -70,15 +69,15 @@ typedef struct mbedtls_threading_mutex_t
 | 
			
		||||
 * \param mutex_lock    the lock function implementation
 | 
			
		||||
 * \param mutex_unlock  the unlock function implementation
 | 
			
		||||
 */
 | 
			
		||||
void mbedtls_threading_set_alt( void (*mutex_init)( mbedtls_threading_mutex_t * ),
 | 
			
		||||
                       void (*mutex_free)( mbedtls_threading_mutex_t * ),
 | 
			
		||||
                       int (*mutex_lock)( mbedtls_threading_mutex_t * ),
 | 
			
		||||
                       int (*mutex_unlock)( mbedtls_threading_mutex_t * ) );
 | 
			
		||||
void mbedtls_threading_set_alt(void (*mutex_init)(mbedtls_threading_mutex_t *),
 | 
			
		||||
                               void (*mutex_free)(mbedtls_threading_mutex_t *),
 | 
			
		||||
                               int (*mutex_lock)(mbedtls_threading_mutex_t *),
 | 
			
		||||
                               int (*mutex_unlock)(mbedtls_threading_mutex_t *));
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief               Free global mutexes.
 | 
			
		||||
 */
 | 
			
		||||
void mbedtls_threading_free_alt( void );
 | 
			
		||||
void mbedtls_threading_free_alt(void);
 | 
			
		||||
#endif /* MBEDTLS_THREADING_ALT */
 | 
			
		||||
 | 
			
		||||
#if defined(MBEDTLS_THREADING_C)
 | 
			
		||||
@@ -87,10 +86,10 @@ void mbedtls_threading_free_alt( void );
 | 
			
		||||
 *
 | 
			
		||||
 * All these functions are expected to work or the result will be undefined.
 | 
			
		||||
 */
 | 
			
		||||
extern void (*mbedtls_mutex_init)( mbedtls_threading_mutex_t *mutex );
 | 
			
		||||
extern void (*mbedtls_mutex_free)( mbedtls_threading_mutex_t *mutex );
 | 
			
		||||
extern int (*mbedtls_mutex_lock)( mbedtls_threading_mutex_t *mutex );
 | 
			
		||||
extern int (*mbedtls_mutex_unlock)( mbedtls_threading_mutex_t *mutex );
 | 
			
		||||
extern void (*mbedtls_mutex_init)(mbedtls_threading_mutex_t *mutex);
 | 
			
		||||
extern void (*mbedtls_mutex_free)(mbedtls_threading_mutex_t *mutex);
 | 
			
		||||
extern int (*mbedtls_mutex_lock)(mbedtls_threading_mutex_t *mutex);
 | 
			
		||||
extern int (*mbedtls_mutex_unlock)(mbedtls_threading_mutex_t *mutex);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Global mutexes
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user