1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Fix a mod_ssl build problem on OS/390.

This is admittedly rather ugly code to come up with a unique 4-byte
identifier for the thread.  Since our threads are pthreads and a pthread
maps 1:1 to a TCB, the address of the TCB is sufficient.   Yes, every
TCB sees a different piece of real storage mapped to the first page,
so the code does make sense.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2002-05-09 10:53:28 +00:00
parent e3d047b595
commit c6512b2859
2 changed files with 15 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
Changes with Apache 2.0.37 Changes with Apache 2.0.37
*) Fix a mod_ssl build problem on OS/390. [Jeff Trawick]
*) Fixed If-Modified-Since on Win32, which would give false positives *) Fixed If-Modified-Since on Win32, which would give false positives
because of the sub-second resolution of file timestamps on that because of the sub-second resolution of file timestamps on that
platform. [Cliff Woolley] platform. [Cliff Woolley]

View File

@@ -419,7 +419,20 @@ static void ssl_util_thr_lock(int mode, int type,
static unsigned long ssl_util_thr_id(void) static unsigned long ssl_util_thr_id(void)
{ {
/* OpenSSL needs this to return an unsigned long. On OS/390, the pthread
* id is a structure twice that big. Use the TCB pointer instead as a
* unique unsigned long.
*/
#ifdef __MVS__
struct PSA {
char unmapped[540];
unsigned long PSATOLD;
} *psaptr = 0;
return psaptr->PSATOLD;
#else
return (unsigned long) apr_os_thread_current(); return (unsigned long) apr_os_thread_current();
#endif
} }
static apr_status_t ssl_util_thread_cleanup(void *data) static apr_status_t ssl_util_thread_cleanup(void *data)