Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Threading abstraction layer |
| 3 | * |
Bence Szépkúti | a2947ac | 2020-08-19 16:37:36 +0200 | [diff] [blame] | 4 | * Copyright The Mbed TLS Contributors |
Bence Szépkúti | f744bd7 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| 6 | * |
| 7 | * This file is provided under the Apache License 2.0, or the |
| 8 | * GNU General Public License v2.0 or later. |
| 9 | * |
| 10 | * ********** |
| 11 | * Apache License 2.0: |
Manuel Pégourié-Gonnard | 37ff140 | 2015-09-04 14:21:07 +0200 | [diff] [blame] | 12 | * |
| 13 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 14 | * not use this file except in compliance with the License. |
| 15 | * You may obtain a copy of the License at |
| 16 | * |
| 17 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 18 | * |
| 19 | * Unless required by applicable law or agreed to in writing, software |
| 20 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 21 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 22 | * See the License for the specific language governing permissions and |
| 23 | * limitations under the License. |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 24 | * |
Bence Szépkúti | f744bd7 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 25 | * ********** |
| 26 | * |
| 27 | * ********** |
| 28 | * GNU General Public License v2.0 or later: |
| 29 | * |
| 30 | * This program is free software; you can redistribute it and/or modify |
| 31 | * it under the terms of the GNU General Public License as published by |
| 32 | * the Free Software Foundation; either version 2 of the License, or |
| 33 | * (at your option) any later version. |
| 34 | * |
| 35 | * This program is distributed in the hope that it will be useful, |
| 36 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 37 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 38 | * GNU General Public License for more details. |
| 39 | * |
| 40 | * You should have received a copy of the GNU General Public License along |
| 41 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 42 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 43 | * |
| 44 | * ********** |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 45 | */ |
| 46 | |
Andres Amaya Garcia | e9b10b2 | 2018-09-05 11:25:30 +0100 | [diff] [blame] | 47 | /* |
Hanno Becker | 48a816f | 2018-09-05 15:22:22 +0100 | [diff] [blame] | 48 | * Ensure gmtime_r is available even with -std=c99; must be defined before |
Andres Amaya Garcia | e9b10b2 | 2018-09-05 11:25:30 +0100 | [diff] [blame] | 49 | * config.h, which pulls in glibc's features.h. Harmless on other platforms. |
| 50 | */ |
Andres Amaya Garcia | 94b540a | 2018-09-05 12:27:32 +0100 | [diff] [blame] | 51 | #if !defined(_POSIX_C_SOURCE) |
Andres Amaya Garcia | e9b10b2 | 2018-09-05 11:25:30 +0100 | [diff] [blame] | 52 | #define _POSIX_C_SOURCE 200112L |
Andres Amaya Garcia | 94b540a | 2018-09-05 12:27:32 +0100 | [diff] [blame] | 53 | #endif |
Andres Amaya Garcia | e9b10b2 | 2018-09-05 11:25:30 +0100 | [diff] [blame] | 54 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 55 | #if !defined(MBEDTLS_CONFIG_FILE) |
Manuel Pégourié-Gonnard | 7f80997 | 2015-03-09 17:05:11 +0000 | [diff] [blame] | 56 | #include "mbedtls/config.h" |
Manuel Pégourié-Gonnard | cef4ad2 | 2014-04-29 12:39:06 +0200 | [diff] [blame] | 57 | #else |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 58 | #include MBEDTLS_CONFIG_FILE |
Manuel Pégourié-Gonnard | cef4ad2 | 2014-04-29 12:39:06 +0200 | [diff] [blame] | 59 | #endif |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 60 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 61 | #if defined(MBEDTLS_THREADING_C) |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 62 | |
Manuel Pégourié-Gonnard | 7f80997 | 2015-03-09 17:05:11 +0000 | [diff] [blame] | 63 | #include "mbedtls/threading.h" |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 64 | |
Hanno Becker | 6a73978 | 2018-09-05 15:06:19 +0100 | [diff] [blame] | 65 | #if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_PLATFORM_GMTIME_R_ALT) |
Hanno Becker | 323d801 | 2018-09-06 11:30:57 +0100 | [diff] [blame] | 66 | |
Hanno Becker | cfeb70c | 2018-09-05 13:50:22 +0100 | [diff] [blame] | 67 | #if !defined(_WIN32) && (defined(unix) || \ |
Andres Amaya Garcia | 433f911 | 2018-09-05 12:01:57 +0100 | [diff] [blame] | 68 | defined(__unix) || defined(__unix__) || (defined(__APPLE__) && \ |
| 69 | defined(__MACH__))) |
Andres Amaya Garcia | ce6eebb | 2018-08-07 20:26:55 +0100 | [diff] [blame] | 70 | #include <unistd.h> |
Hanno Becker | 323d801 | 2018-09-06 11:30:57 +0100 | [diff] [blame] | 71 | #endif /* !_WIN32 && (unix || __unix || __unix__ || |
| 72 | * (__APPLE__ && __MACH__)) */ |
| 73 | |
Hanno Becker | 6f70581 | 2018-09-06 09:06:33 +0100 | [diff] [blame] | 74 | #if !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) || \ |
| 75 | ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) && \ |
Chris Jones | 0a63560 | 2020-11-13 08:52:00 +0000 | [diff] [blame] | 76 | _POSIX_THREAD_SAFE_FUNCTIONS >= 200112L ) ) |
Andres Amaya Garcia | ca04a01 | 2018-09-05 11:43:57 +0100 | [diff] [blame] | 77 | /* |
| 78 | * This is a convenience shorthand macro to avoid checking the long |
| 79 | * preprocessor conditions above. Ideally, we could expose this macro in |
Hanno Becker | 7dd82b4 | 2018-09-05 16:25:50 +0100 | [diff] [blame] | 80 | * platform_util.h and simply use it in platform_util.c, threading.c and |
Andres Amaya Garcia | ca04a01 | 2018-09-05 11:43:57 +0100 | [diff] [blame] | 81 | * threading.h. However, this macro is not part of the Mbed TLS public API, so |
Andres Amaya Garcia | 3c9733a | 2018-09-05 11:52:07 +0100 | [diff] [blame] | 82 | * we keep it private by only defining it in this file |
Andres Amaya Garcia | ca04a01 | 2018-09-05 11:43:57 +0100 | [diff] [blame] | 83 | */ |
Hanno Becker | f5106d5 | 2018-09-06 12:09:56 +0100 | [diff] [blame] | 84 | |
| 85 | #if ! ( defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) ) |
Andres Amaya Garcia | d717743 | 2018-08-08 09:41:17 +0100 | [diff] [blame] | 86 | #define THREADING_USE_GMTIME |
Hanno Becker | f5106d5 | 2018-09-06 12:09:56 +0100 | [diff] [blame] | 87 | #endif /* ! ( defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) ) */ |
| 88 | |
Hanno Becker | 6f70581 | 2018-09-06 09:06:33 +0100 | [diff] [blame] | 89 | #endif /* !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) || \ |
| 90 | ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) && \ |
Chris Jones | 0a63560 | 2020-11-13 08:52:00 +0000 | [diff] [blame] | 91 | _POSIX_THREAD_SAFE_FUNCTIONS >= 200112L ) ) */ |
Hanno Becker | 323d801 | 2018-09-06 11:30:57 +0100 | [diff] [blame] | 92 | |
Hanno Becker | 6a73978 | 2018-09-05 15:06:19 +0100 | [diff] [blame] | 93 | #endif /* MBEDTLS_HAVE_TIME_DATE && !MBEDTLS_PLATFORM_GMTIME_R_ALT */ |
Andres Amaya Garcia | ce6eebb | 2018-08-07 20:26:55 +0100 | [diff] [blame] | 94 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 95 | #if defined(MBEDTLS_THREADING_PTHREAD) |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 96 | static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex ) |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 97 | { |
Janos Follath | 6e87698 | 2016-10-28 14:59:12 +0100 | [diff] [blame] | 98 | if( mutex == NULL ) |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 99 | return; |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 100 | |
Gilles Peskine | 7ba73e5 | 2021-02-09 15:35:29 +0100 | [diff] [blame] | 101 | /* A nonzero value of is_valid indicates a successfully initialized |
| 102 | * mutex. This is a workaround for not being able to return an error |
| 103 | * code for this function. The lock/unlock functions return an error |
| 104 | * if is_valid is nonzero. The Mbed TLS unit test code uses this field |
| 105 | * to distinguish more states of the mutex; see helpers.function for |
| 106 | * details. */ |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 107 | mutex->is_valid = pthread_mutex_init( &mutex->mutex, NULL ) == 0; |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 108 | } |
| 109 | |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 110 | static void threading_mutex_free_pthread( mbedtls_threading_mutex_t *mutex ) |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 111 | { |
Janos Follath | 5437a75 | 2016-09-26 09:15:44 +0100 | [diff] [blame] | 112 | if( mutex == NULL || !mutex->is_valid ) |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 113 | return; |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 114 | |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 115 | (void) pthread_mutex_destroy( &mutex->mutex ); |
Janos Follath | 5437a75 | 2016-09-26 09:15:44 +0100 | [diff] [blame] | 116 | mutex->is_valid = 0; |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 117 | } |
| 118 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 119 | static int threading_mutex_lock_pthread( mbedtls_threading_mutex_t *mutex ) |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 120 | { |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 121 | if( mutex == NULL || ! mutex->is_valid ) |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 122 | return( MBEDTLS_ERR_THREADING_BAD_INPUT_DATA ); |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 123 | |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 124 | if( pthread_mutex_lock( &mutex->mutex ) != 0 ) |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 125 | return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 126 | |
| 127 | return( 0 ); |
| 128 | } |
| 129 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 130 | static int threading_mutex_unlock_pthread( mbedtls_threading_mutex_t *mutex ) |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 131 | { |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 132 | if( mutex == NULL || ! mutex->is_valid ) |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 133 | return( MBEDTLS_ERR_THREADING_BAD_INPUT_DATA ); |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 134 | |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 135 | if( pthread_mutex_unlock( &mutex->mutex ) != 0 ) |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 136 | return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 137 | |
| 138 | return( 0 ); |
| 139 | } |
| 140 | |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 141 | void (*mbedtls_mutex_init)( mbedtls_threading_mutex_t * ) = threading_mutex_init_pthread; |
| 142 | void (*mbedtls_mutex_free)( mbedtls_threading_mutex_t * ) = threading_mutex_free_pthread; |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 143 | int (*mbedtls_mutex_lock)( mbedtls_threading_mutex_t * ) = threading_mutex_lock_pthread; |
| 144 | int (*mbedtls_mutex_unlock)( mbedtls_threading_mutex_t * ) = threading_mutex_unlock_pthread; |
Manuel Pégourié-Gonnard | 944cfe8 | 2015-05-27 20:07:18 +0200 | [diff] [blame] | 145 | |
| 146 | /* |
| 147 | * With phtreads we can statically initialize mutexes |
| 148 | */ |
| 149 | #define MUTEX_INIT = { PTHREAD_MUTEX_INITIALIZER, 1 } |
| 150 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 151 | #endif /* MBEDTLS_THREADING_PTHREAD */ |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 152 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 153 | #if defined(MBEDTLS_THREADING_ALT) |
| 154 | static int threading_mutex_fail( mbedtls_threading_mutex_t *mutex ) |
Paul Bakker | c78c842 | 2013-12-31 11:55:27 +0100 | [diff] [blame] | 155 | { |
| 156 | ((void) mutex ); |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 157 | return( MBEDTLS_ERR_THREADING_BAD_INPUT_DATA ); |
Paul Bakker | c78c842 | 2013-12-31 11:55:27 +0100 | [diff] [blame] | 158 | } |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 159 | static void threading_mutex_dummy( mbedtls_threading_mutex_t *mutex ) |
| 160 | { |
| 161 | ((void) mutex ); |
| 162 | return; |
| 163 | } |
Paul Bakker | c78c842 | 2013-12-31 11:55:27 +0100 | [diff] [blame] | 164 | |
Manuel Pégourié-Gonnard | 1e2eae0 | 2015-04-29 01:26:03 +0200 | [diff] [blame] | 165 | void (*mbedtls_mutex_init)( mbedtls_threading_mutex_t * ) = threading_mutex_dummy; |
| 166 | void (*mbedtls_mutex_free)( mbedtls_threading_mutex_t * ) = threading_mutex_dummy; |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 167 | int (*mbedtls_mutex_lock)( mbedtls_threading_mutex_t * ) = threading_mutex_fail; |
| 168 | int (*mbedtls_mutex_unlock)( mbedtls_threading_mutex_t * ) = threading_mutex_fail; |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 169 | |
Manuel Pégourié-Gonnard | 944cfe8 | 2015-05-27 20:07:18 +0200 | [diff] [blame] | 170 | /* |
| 171 | * Set functions pointers and initialize global mutexes |
| 172 | */ |
| 173 | void mbedtls_threading_set_alt( void (*mutex_init)( mbedtls_threading_mutex_t * ), |
| 174 | void (*mutex_free)( mbedtls_threading_mutex_t * ), |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 175 | int (*mutex_lock)( mbedtls_threading_mutex_t * ), |
| 176 | int (*mutex_unlock)( mbedtls_threading_mutex_t * ) ) |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 177 | { |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 178 | mbedtls_mutex_init = mutex_init; |
| 179 | mbedtls_mutex_free = mutex_free; |
| 180 | mbedtls_mutex_lock = mutex_lock; |
| 181 | mbedtls_mutex_unlock = mutex_unlock; |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 182 | |
Gergely Budai | 13f7fb3 | 2017-08-23 14:23:58 +0200 | [diff] [blame] | 183 | #if defined(MBEDTLS_FS_IO) |
Manuel Pégourié-Gonnard | 944cfe8 | 2015-05-27 20:07:18 +0200 | [diff] [blame] | 184 | mbedtls_mutex_init( &mbedtls_threading_readdir_mutex ); |
Gergely Budai | 13f7fb3 | 2017-08-23 14:23:58 +0200 | [diff] [blame] | 185 | #endif |
Andres Amaya Garcia | d717743 | 2018-08-08 09:41:17 +0100 | [diff] [blame] | 186 | #if defined(THREADING_USE_GMTIME) |
Andres Amaya Garcia | ce6eebb | 2018-08-07 20:26:55 +0100 | [diff] [blame] | 187 | mbedtls_mutex_init( &mbedtls_threading_gmtime_mutex ); |
| 188 | #endif |
Manuel Pégourié-Gonnard | 944cfe8 | 2015-05-27 20:07:18 +0200 | [diff] [blame] | 189 | } |
| 190 | |
| 191 | /* |
| 192 | * Free global mutexes |
| 193 | */ |
| 194 | void mbedtls_threading_free_alt( void ) |
| 195 | { |
Gergely Budai | 13f7fb3 | 2017-08-23 14:23:58 +0200 | [diff] [blame] | 196 | #if defined(MBEDTLS_FS_IO) |
Manuel Pégourié-Gonnard | 944cfe8 | 2015-05-27 20:07:18 +0200 | [diff] [blame] | 197 | mbedtls_mutex_free( &mbedtls_threading_readdir_mutex ); |
Gergely Budai | 13f7fb3 | 2017-08-23 14:23:58 +0200 | [diff] [blame] | 198 | #endif |
Andres Amaya Garcia | d717743 | 2018-08-08 09:41:17 +0100 | [diff] [blame] | 199 | #if defined(THREADING_USE_GMTIME) |
Andres Amaya Garcia | ce6eebb | 2018-08-07 20:26:55 +0100 | [diff] [blame] | 200 | mbedtls_mutex_free( &mbedtls_threading_gmtime_mutex ); |
| 201 | #endif |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 202 | } |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 203 | #endif /* MBEDTLS_THREADING_ALT */ |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 204 | |
Manuel Pégourié-Gonnard | 944cfe8 | 2015-05-27 20:07:18 +0200 | [diff] [blame] | 205 | /* |
| 206 | * Define global mutexes |
| 207 | */ |
| 208 | #ifndef MUTEX_INIT |
| 209 | #define MUTEX_INIT |
| 210 | #endif |
Gergely Budai | 13f7fb3 | 2017-08-23 14:23:58 +0200 | [diff] [blame] | 211 | #if defined(MBEDTLS_FS_IO) |
Manuel Pégourié-Gonnard | 944cfe8 | 2015-05-27 20:07:18 +0200 | [diff] [blame] | 212 | mbedtls_threading_mutex_t mbedtls_threading_readdir_mutex MUTEX_INIT; |
Gergely Budai | 13f7fb3 | 2017-08-23 14:23:58 +0200 | [diff] [blame] | 213 | #endif |
Andres Amaya Garcia | d717743 | 2018-08-08 09:41:17 +0100 | [diff] [blame] | 214 | #if defined(THREADING_USE_GMTIME) |
Andres Amaya Garcia | ce6eebb | 2018-08-07 20:26:55 +0100 | [diff] [blame] | 215 | mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex MUTEX_INIT; |
| 216 | #endif |
Manuel Pégourié-Gonnard | 944cfe8 | 2015-05-27 20:07:18 +0200 | [diff] [blame] | 217 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 218 | #endif /* MBEDTLS_THREADING_C */ |