Author: rjung
Date: Thu May 31 02:27:59 2007
New Revision: 543093
URL: http://svn.apache.org/viewvc?view=rev&rev=543093
Log:
Always build thread safe against Apache httpd 2.0/2.2
(unless configure detects --enable-prefork).
_REENTRANT flag for APR is not a safe threading detection
for all platforms.
Modified:
tomcat/connectors/trunk/jk/native/common/jk_mt.h
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml
Modified: tomcat/connectors/trunk/jk/native/common/jk_mt.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/
native/common/jk_mt.h?view=diff&rev=543093&r1=543092&r2=543093
====================================================================
==========
--- tomcat/connectors/trunk/jk/native/common/jk_mt.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_mt.h Thu May 31
02:27:59 2007
@@ -33,18 +33,10 @@
#define getpid() ((int)GetThreadGroupID())
#endif
-/*
- * All WIN32 code is MT, UNIX code that uses pthreads is marked
by the POSIX
- * _REENTRANT define.
- */
-#if defined (WIN32) || defined(_REENTRANT) || (defined(NETWARE)
&& defined(__NOVELL_LIBC__))
#ifdef JK_PREFORK
#define _MT_CODE 0
#else
#define _MT_CODE 1
-#endif
-#else
-#define _MT_CODE 0
#endif
/*
Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/
changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/
xdocs/miscellaneous/changelog.xml?
view=diff&rev=543093&r1=543092&r2=543093
====================================================================
==========
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
(original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
Thu May 31 02:27:59 2007
@@ -27,6 +27,10 @@
<br />
<subsection name="Native">
<changelog>
+ <fix>
+ Always build with thread support, unless flag --enable-
prefork
+ is set during for configure. (rjung)
+ </fix>
<update>
i5/OS (AS/400) V5R4 port where Apache 2.0 modules should
now use UTF8. (hgomez)
</update>
Modified: tomcat/connectors/trunk/jk/xdocs/webserver_howto/
apache.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/
xdocs/webserver_howto/apache.xml?
view=diff&rev=543093&r1=543092&r2=543093
====================================================================
==========
--- tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml
(original)
+++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml
Thu May 31 02:27:59 2007
@@ -838,25 +838,26 @@
</screen>
<p>
-If you want to build mod_jk for Apache 1.3 and 2.0/2.2, you should
+If you want to build mod_jk for different version of Apache
httpd, like 1.3, 2.0 and 2.2,
+you need to go through the full build process for each of them.
+Please note, that httpd 2.0 and 2.2 modules are <b>not</b>
compatible. The mod_jk directory
+used is "apache-2.0" in both cases, but you need to compile
separately.
<ul>
<li>
-use configure and indicate Apache 1.3 apxs location (--with-apxs)
+use configure and indicate the correct Apache httpd apxs
location (--with-apxs)
</li>
<li>
use make
</li>
<li>
-copy the mod_jk binary to the apache modules location
+copy the resulting mod_jk.so binary from the apache-1.3 or
apache-2.0 subdirectory
+to the Apache httpd modules location.
</li>
<li>
-make clean (to remove all previously compiled modules)
+make clean (to remove all previously compiled object files)
</li>
<li>
-use configure and indicate Apache 2.0/2.2 apxs location,
-</li>
-<li>
-then make.
+Start over with the apxs location for your next Apache httpd
version.
</li>
</ul>
@@ -886,17 +887,14 @@
</tr>
<tr valign="top"><td>--enable-prefork</td>
<td>
-In case you build mod_jk for a multi-threaded Apache 2.0/2.2 MPM
(Multi-Processing Module),
+In case you build mod_jk for a multi-threaded Apache httpd
2.0/2.2 MPM (Multi-Processing Module),
some areas of mod_jk code need to be synchronized to make it
thread-safe.
-Configure autodetects, whether your are using a multi-threaded MPM.
-For instance, the worker MPM is multi-threaded, the prefork MPM
is not.<br/>
-Depending on how you build your Apache httpd, in some cases
configure
-detects that it needs to build thread safe, although actually it
would not be necessary.
-One such case is, if you build against Apache httpd with prefork
MPM,
-and your APR (Apache Portable Runtime) libraries have been build
with thread support
-(the output of "apxs -q EXTRA_CPPFLAGS" will contain "-
D_REENTRANT").<br/>
+Because configure can not easily detect, whether your are using
a multi-threaded MPM,
+mod_jk by default is always build thread-safe for Apache httpd
2.0/2.2.
If you are sure, that your MPM is not multi-threaded, you can
use "--enable-prefork"
-to force the removal of the synchronization code (thus
increasing performance a bit).</td>
+to force the removal of the synchronization code (thus
increasing performance a bit).
+For instance, the prefork MPM is not multi-threaded. For Apache
httpd 1.3
+this flag will be set automatically.</td>
</tr>
<tr valign="top"><td>--enable-flock</td>
<td>