X-Git-Url: https://granicus.if.org/sourcecode?a=blobdiff_plain;f=docs%2Fmanual%2Fdeveloper%2Fthread_safety.html.en;h=026ba79d87710b8734ddab1025947046f547fe82;hb=88445a671fe9d8c5f34a305cdd5eeb57a1cf7ee5;hp=7a5b86c1b6f1c44ea159b8aebc7026bde71eaf50;hpb=931cdd59ae050731d510b3b6ec9eb808e0c736a4;p=apache diff --git a/docs/manual/developer/thread_safety.html.en b/docs/manual/developer/thread_safety.html.en index 7a5b86c1b6..026ba79d87 100644 --- a/docs/manual/developer/thread_safety.html.en +++ b/docs/manual/developer/thread_safety.html.en @@ -5,27 +5,30 @@ This file is generated from xml source: DO NOT EDIT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --> -Apache 2.0 Thread Safety Issues - Apache HTTP Server +Apache HTTP Server 2.x Thread Safety Issues - Apache HTTP Server - + + +
<-
-Apache > HTTP Server > Documentation > Version 2.3 > Developer Documentation

Apache 2.0 Thread Safety Issues

+Apache > HTTP Server > Documentation > Version 2.5 > Developer Documentation

Apache HTTP Server 2.x Thread Safety Issues

Available Languages:  en 

-

When using any of the threaded mpms in Apache 2.0 it is important +

When using any of the threaded mpms in the Apache HTTP Server 2.x it is important that every function called from Apache be thread safe. When linking in 3rd party extensions it can be difficult to determine whether the resulting server will be thread safe. Casual testing generally won't tell you this - either as thread safety problems can lead to subtle race conditons that + either as thread safety problems can lead to subtle race conditions that may only show up in certain conditions under heavy load.

+
top

Global and static variables

@@ -48,7 +51,7 @@ allowed to use static or global variables. There are times when you actually want something to affect all threads, but generally you need to avoid using them if you want your code to be thread safe.

- +

In the case where you have a global variable that needs to be global and accessed by all threads, be very careful when you update it. If, for example, it is an incrementing counter, you need to atomically increment @@ -84,7 +87,7 @@ to their *_r equivalents and sometimes changes the common getc/putc macros into safer function calls. Check your libc documentation for specifics. Instead of, or in - addition to _REENTRANT the symbols that may affect this are + addition to _REENTRANT the symbols that may affect this are _POSIX_C_SOURCE, _THREAD_SAFE, _SVID_SOURCE, and _BSD_SOURCE.

top
@@ -275,7 +278,28 @@

Available Languages:  en 

-
+
top

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
+
\ No newline at end of file