Re: Thred safety

Michael Hennebry <[email protected]>
Newsgroups gmane.comp.gnu.glpk
Message-ID <[email protected]>
On Sun, 29 Jan 2017, Andrew Makhorin wrote:

> 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.

-- 
Michael   [email protected]
"Sorry but your password must contain an uppercase letter, a number,
a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
                                                              --  someeecards
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.