diff options
author | Andrew Waterman <andrew@sifive.com> | 2024-06-13 17:54:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 17:54:35 -0700 |
commit | 2d7af2fb56937171b9794205d854a85b0dd41bb4 (patch) | |
tree | 78174226d1be08e76cb1b198832e6879d532224f | |
parent | 92d6c3f7f26b49180178aaa9a3644c92adfa3ef6 (diff) | |
parent | 6c008e990c999dca2f1fff06c5bc96e455f63acd (diff) | |
download | riscv-isa-sim-2d7af2fb56937171b9794205d854a85b0dd41bb4.zip riscv-isa-sim-2d7af2fb56937171b9794205d854a85b0dd41bb4.tar.gz riscv-isa-sim-2d7af2fb56937171b9794205d854a85b0dd41bb4.tar.bz2 |
Merge pull request #1689 from riscv-software-src/rounding-mode-thread-local
Make softfloat's rounding mode thread-local
-rw-r--r-- | softfloat/softfloat.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/softfloat/softfloat.h b/softfloat/softfloat.h index eb78d74..72daccb 100644 --- a/softfloat/softfloat.h +++ b/softfloat/softfloat.h @@ -50,8 +50,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <stdint.h> #include "softfloat_types.h" -#ifndef THREAD_LOCAL -#define THREAD_LOCAL +#if __has_include(<threads.h>) +# include <threads.h> +# define THREAD_LOCAL thread_local +#else +# define THREAD_LOCAL _Thread_local #endif #ifdef __cplusplus |