Code

Imported upstream version 1.4.2.
[pkg-rrdtool.git] / doc / rrdthreads.txt
index 43bd697a3dc498a544eb9db78184bff7dc7d53f2..3db8d76c3ced745d1d9029315e40c647249c3dc8 100644 (file)
@@ -20,62 +20,62 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        In order to use librrd in multi-threaded programs you must:
 
-       Â·   Link with _\bl_\bi_\bb_\br_\br_\bd_\b__\bt_\bh instead of _\bl_\bi_\bb_\br_\br_\bd (use "-lrrd_th" when linking)
+       ·   Link with _\bl_\bi_\bb_\br_\br_\bd_\b__\bt_\bh instead of _\bl_\bi_\bb_\br_\br_\bd (use "-lrrd_th" when linking)
 
-       Â·   Use the ""_r"" functions instead of the normal API-functions
+       ·   Use the ""_r"" functions instead of the normal API-functions
 
-       Â·   Do not use any at-style time specifications. Parsing of such time
+       ·   Do not use any at-style time specifications. Parsing of such time
            specifications is terribly non-thread-safe.
 
-       Â·   Never use non *"_r" functions unless it is explicitly documented
+       ·   Never use non *"_r" functions unless it is explicitly documented
            that the function is tread-safe.
 
-       Â·   Every thread SHOULD call "rrd_get_context()" before its first call
+       ·   Every thread SHOULD call "rrd_get_context()" before its first call
            to any "librrd_th" function in order to set up thread specific
            data. This is not strictly required, but it is the only way to test
            if memory allocation can be done by this function. Otherwise the
            program may die with a SIGSEGV in a low-memory situation.
 
-       Â·   Always call "rrd_error_clear()" before any call to the library.
+       ·   Always call "rrd_error_clear()" before any call to the library.
            Otherwise the call might fail due to some earlier error.
 
    N\bNO\bOT\bTE\bES\bS F\bFO\bOR\bR R\bRR\bRD\bD C\bCO\bON\bNT\bTR\bRI\bIB\bBU\bUT\bTO\bOR\bRS\bS
        Some precautions must be followed when developing RRD from now on:
 
-       Â·   Only use thread-safe functions in library code. Many often used
+       ·   Only use thread-safe functions in library code. Many often used
            libc functions aren't thread-safe. Take care in the following
            situations or when using the following library functions:
 
-           Â·   Direct calls to "strerror()" must be avoided: use
+           ·   Direct calls to "strerror()" must be avoided: use
                "rrd_strerror()" instead, it provides a per-thread error
                message.
 
-           Â·   The "getpw*", "getgr*", "gethost*" function families (and some
+           ·   The "getpw*", "getgr*", "gethost*" function families (and some
                more "get*" functions) are not thread-safe: use the *"_r"
                variants
 
-           Â·   Time functions: "asctime", "ctime", "gmtime", "localtime": use
+           ·   Time functions: "asctime", "ctime", "gmtime", "localtime": use
                *"_r" variants
 
-           Â·   "strtok": use "strtok_r"
+           ·   "strtok": use "strtok_r"
 
-           Â·   "tmpnam": use "tmpnam_r"
+           ·   "tmpnam": use "tmpnam_r"
 
-           Â·   Many others (lookup documentation)
+           ·   Many others (lookup documentation)
 
-       Â·   A header file named _\br_\br_\bd_\b__\bi_\bs_\b__\bt_\bh_\br_\be_\ba_\bd_\b__\bs_\ba_\bf_\be_\b._\bh is provided that works
+       ·   A header file named _\br_\br_\bd_\b__\bi_\bs_\b__\bt_\bh_\br_\be_\ba_\bd_\b__\bs_\ba_\bf_\be_\b._\bh is provided that works
            with the GNU C-preprocessor to "poison" some of the most common
            non-thread-safe functions using the "#pragma GCC poison" directive.
            Just include this header in source files you want to keep thread-
            safe.
 
-       Â·   Do not introduce global variables!
+       ·   Do not introduce global variables!
 
            If you really, really have to use a global variable you may add a
            new field to the "rrd_context" structure and modify _\br_\br_\bd_\b__\be_\br_\br_\bo_\br_\b._\bc,
            _\br_\br_\bd_\b__\bt_\bh_\br_\be_\ba_\bd_\b__\bs_\ba_\bf_\be_\b._\bc and _\br_\br_\bd_\b__\bn_\bo_\bn_\b__\bt_\bh_\br_\be_\ba_\bd_\b__\bs_\ba_\bf_\be_\b._\bc
 
-       Â·   Do not use "getopt" or "getopt_long" in *"_r" (neither directly nor
+       ·   Do not use "getopt" or "getopt_long" in *"_r" (neither directly nor
            indirectly).
 
            "getopt" uses global variables and behaves badly in a multi-
@@ -84,7 +84,7 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
            provide argc and **argv arguments for variable length argument
            lists. See "rrd_update_r" as an example.
 
-       Â·   Do not use the "rrd_parsetime" function!
+       ·   Do not use the "rrd_parsetime" function!
 
            It uses lots of global variables. You may use it in functions not
            designed to be thread-safe, like in functions wrapping the "_r"
@@ -100,4 +100,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.999                           2009-04-19                     RRDTHREADS(1)
+1.4.2                             2008-06-08                     RRDTHREADS(1)