在 2023-04-11 21:14, LIU Hao 写道:
It's because `__emutls_get_address()` returns two distinct values in consecutive calls with the same descriptor in the same thread, so the second reference to the thread local `__gmpfr_default_fp_bit_precision` (defined in 'set_dfl_prec.c') gets a fresh object with its default value.This should not happen. Please give me some time to work on this.
Looks like emutls could not set the thread-specific value for 'foreign threads' (those not created by mcfgthread). Although this is by design, I do think the MPFR expectation should be reasonably supported. I will fix this in a couple of days.
This works (users should use `std::thread` or C11 `thrd_create()` instead):
```
#include <mcfgthread/gthr.h>
(...)
__gthread_t thread1;
iret1 = __gthread_create( &thread1, foo, (void*) message1);
__gthread_join( thread1, NULL);
(...)
```
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
