Subject: Re: THREAD SAFETY section
To: Michael C. Richardson <mcr@sandelman.ottawa.on.ca>
From: Klaus Klein <kleink@ira.uka.de>
List: tech-userlevel
Date: 09/11/1998 13:53:22
"Michael C. Richardson" <mcr@sandelman.ottawa.on.ca> writes:

> >>>>> "Jason" == Jason Thorpe <thorpej@nas.nasa.gov> writes:
>     Jason> You are misunderstanding... some functions, due to their
>     Jason> standardized or historic semantics, CANNOT be made thread-safe.
> 
>   For instance, strtok() would be hard to make make thread-safe, I
>   think.

It wouldn't be hard; allocating a piece of thread-specific storage to
store the internal `last' pointer is easy enough.

Note that I don't argue modifying this specific function that way
would make sense, since we'd still be stuck with strtok()'s other
design deficiencies.