>Although the POSIX standard may declare that these functions need not
>be thread-safe, an implementation where they are thread-safe would
>certainly satisfy POSIX. In BeOS, where threads are pervasive, I'd
>argue that all of the standard library should be thread-safe.
Thread safe may be a good thing or a bad thing.
Example:
thread 1
thread 2
read (fd,buffer,2048);
acquire_sem(thread2Pause);
char *foo=strtok(buffer,":"); char
*bar=strtok(NULL);
release_sem(thread2Pause); // Process
// Continue on doing other things...
Yeah, I know that this is a small, contrived example, but one *could* want and
even expect that strtok works across threads.