in reply to Re: [Win32] differing threads behaviour
in thread [Win32] differing threads behaviour
It exhibits the same 12.2.0-versus-13.0.l anomaly.#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <mpfr.h> void *foo( void *ptr ); int main(void) { pthread_t thread1; char *message1 = "precision in thread1:"; int iret1; if(mpfr_buildopt_tls_p()) printf("mpfr was built with TLS support +\n"); else printf("mpfr was NOT built with TLS support\n"); mpfr_set_default_prec(101); iret1 = pthread_create( &thread1, NULL, foo, (void*) message1); pthread_join( thread1, NULL); printf("pthread_create() returned: %d\n",iret1); printf("Back in main: %d\n", mpfr_get_default_prec()); return 0; } void *foo( void * ptr) { char *message; message = (char *) ptr; mpfr_set_default_prec(201); printf("%s %d\n", message, mpfr_get_default_prec()); pthread_exit (NULL); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: [Win32] differing threads behaviour
by syphilis (Archbishop) on Apr 12, 2023 at 01:31 UTC |