Ken Goldman via RT wrote:
http://www.openssl.org/docs/crypto/threads.html says
...

"id_function(void) is a function that returns a thread ID. It is not
needed on Windows nor on platforms where getpid() returns a different
ID for each thread (most notably Linux)."

On my Linux system, getpid() returns the same pid for each thread.
I'm told that this is the correct Posix behavior, although a Google
search showed that early Linux did not do that.

How about the replacement text

 "id_function(void) is a function that returns a thread ID, for instance,
 pthread_self(). It is not, needed on Windows nor on platforms where getpid()
 returns a different ID for each thread.  However, even on those platforms,
 pthread_self() should be used, since the behavior of getpid() may depend
 on the machine where the program is being run, not the machine where
 the program is being compiled.
 (For instance, Red Hat 8 Linux and earlier
 used LinuxThreads, whose getpid() returns a different value for each thread;
 Red Hat 9 Linux and later use NPTL, which is Posix-conformant, and thus
 whose getpid() returns the same value for each thread in a process.
 But a program compiled on Red Hat 8 and run on Red Hat 9 will
 by default see getpid() returning the same value for all threads.)

Or something shorter but still as enlightening :-)

--
Trying to get a job as a c++ developer?  See 
http://kegel.com/academy/getting-hired.html
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to