X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=doc%2Frrdthreads.html;fp=doc%2Frrdthreads.html;h=36b365081ffe4b9e30d8fff8f386575c9830d352;hb=51c3d3fb997c22e1ee828470413f1e84989e1f6c;hp=cbc57358d61d16a561eff18237693023da58472e;hpb=1559397b94b4af3de73cfa23c04be31d8bee53e7;p=pkg-rrdtool.git diff --git a/doc/rrdthreads.html b/doc/rrdthreads.html index cbc5735..36b3650 100644 --- a/doc/rrdthreads.html +++ b/doc/rrdthreads.html @@ -9,8 +9,10 @@
- + +@@ -44,7 +50,7 @@ on the way to use the multi-threaded version of librrd in your own programs. It also gives hints for future RRD development to keep the library thread-safe.
Currently only some RRD operations are implemented in a thread-safe
-way. They all end in the usual ``_r
'' suffix.
_r
" suffix.
_r
'' suffix.
In order to use librrd in multi-threaded programs you must:
Link with librrd_th instead of librrd (use -lrrd_th
when
+
Link with librrd_th instead of librrd (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 @@ -112,8 +118,8 @@ instead, it provides a per-thread error message.
A header file named rrd_is_thread_safe.h is provided -that works with the GNU C-preprocessor to ``poison'' some of the most +
A header file named rrd_is_thread_safe.h 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!
If you really, really have to use a global variable you may add a new
-field to the rrd_context
structure and modify rrd_error.c,
-rrd_thread_safe.c and rrd_non_thread_safe.c
rrd_context
structure and modify rrd_error.c,
+rrd_thread_safe.c and rrd_non_thread_safe.c
Do not use getopt
or getopt_long
in *_r
(neither directly nor