Skip to content

Commit 2d7af2f

Browse files
authored
Merge pull request #1689 from riscv-software-src/rounding-mode-thread-local
Make softfloat's rounding mode thread-local
2 parents 92d6c3f + 6c008e9 commit 2d7af2f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

softfloat/softfloat.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5050
#include <stdint.h>
5151
#include "softfloat_types.h"
5252

53-
#ifndef THREAD_LOCAL
54-
#define THREAD_LOCAL
53+
#if __has_include(<threads.h>)
54+
# include <threads.h>
55+
# define THREAD_LOCAL thread_local
56+
#else
57+
# define THREAD_LOCAL _Thread_local
5558
#endif
5659

5760
#ifdef __cplusplus

0 commit comments

Comments
 (0)