Subject: Re: THREAD SAFETY section
To: Michael C. Richardson <>
From: Klaus Klein <>
List: tech-userlevel
Date: 09/11/1998 13:53:22
"Michael C. Richardson" <> writes:

> >>>>> "Jason" == Jason Thorpe <> 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.