> > I replaced all calls to gmtime, strerror, and strtok with corresponding > > calls to wrappers xgmtime, xstrerr, and xstrtok (see env/stdc.c). > > > > At the moment the wrappers just call corresponding standard functions. > > Any idea how to better implement them? > > Until you have something better, > sandwich the calls and the data-copying between a mutex lock and unlock. > With threads, I expect implementation-dependent stuff. > I expect it can be placed in a header file. >
I implemented the wrappers using thread-safe functions (i.e. gmtime_r, strerror_r, and strtok_r) and thread local storage objects to store static data. Please see http://lists.gnu.org/archive/html/help-glpk/2017-01/msg00138.html . Andrew Makhorin _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
