X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=doc%2Frrdthreads.pod;h=a1f6e742154c5ea195464f197b37ef703610a874;hb=1f8fb56f90e611d4b636c8cb32d0dfbae4afeeb2;hp=7e6a6895116d05fd34f26afa41f8bda15783c489;hpb=fe550d874ba79acc9f033be6d50a29462a3b64d2;p=rrdtool.git diff --git a/doc/rrdthreads.pod b/doc/rrdthreads.pod index 7e6a689..a1f6e74 100644 --- a/doc/rrdthreads.pod +++ b/doc/rrdthreads.pod @@ -1,6 +1,6 @@ =head1 NAME - rrdthreads - Provisions for linking the RRD library to use in multi-threaded programs +rrdthreads - Provisions for linking the RRD library to use in multi-threaded programs =head1 SYNOPSIS @@ -18,7 +18,7 @@ way. They all end in the usual "C<_r>" prefix. In order to use the librrd in multi-threaded programs you must: -=over 4 +=over =item * @@ -54,11 +54,11 @@ library. Otherwise the call might fail due to some earlier error. =back -=head1 IMPORTANT NOTES FOR RRD CONTRIBUTORS: +=head2 NOTES FOR RRD CONTRIBUTORS Some precautions must be followed when developing RRD from now on: -=over 4 +=over =item * @@ -66,7 +66,7 @@ Only use thread-safe functions in library code. Many often used libc functions aren't thread-safe. Take care in the following situations/when using the following library functions: -=over 8 +=over =item * @@ -97,7 +97,9 @@ Many other (lookup documentation) =back -As an aide(?) a header file named F is provided +=item * + +A header file named F is provided that works with the GNU C-preprocessor to "poison" some of the most common non-thread-safe functions using the C<#pragma GCC poison> directive. Just include this header in source files you want to keep @@ -116,7 +118,7 @@ F and F Do not use C or C in *C<_r> (directly or indirectly) -C uses global variables and behaves badly in a multithreaded +C uses global variables and behaves badly in a multi-threaded application when called concurrently. Instead provide a *_r function taking all options as function parameters. You may provide argc and **argv arguments for variable length argument lists. See @@ -128,23 +130,15 @@ Do not use the C function! It uses lots of global vars. You may use it in functions not designed to be thread-safe like functions wrapping the C<_r> version of some -operation (eg. C, but not in C) +operation (e.g., C, but not in C) =back -=head1 CURRENTLY IMPLEMENTED THREAD SAFE FUNCTIONS +=head2 CURRENTLY IMPLEMENTED THREAD SAFE FUNCTIONS Currently there exit thread-safe variants of C, C, C, C and C. =head1 AUTHOR -Initial multi-threading support was implemented by Peter Stamfest - in Feb. 2003. - -This documentation was written by Peter Stamfest. - -Changes to the RRD library and this documentation are (c) 2003 by -Peter Stamfest and are distributed under the GPL. - -=cut +Peter Stamfest Epeter@stamfest.atE