apache/trafficserver — pull request #28 by hessu (2013-12-30 15:53:24+00:00)
Title: TS-2271: Support plugins which use libraries which create threads and use OpenSSL

This pair of patches implements changes to support TS-2271 (https://issues.apache.org/jira/browse/TS-2271).

* OpenSSL init + callbacks are changed to use raw pthread functions, so that they work from threads which were not created using the ATS thread API functions.
* TSHttpTxnReenable does not segfault when it's called from an unexpected thread (not created by ATS thread API functions).

These changes are helpful in case a plugin utilizes a third-party library, which in turn creates pthreads on its own, and ends up calling TSHttpTxnReenable from a thread created by the third-party library.