X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=doc%2Frrdthreads.html;h=36b365081ffe4b9e30d8fff8f386575c9830d352;hb=9880a40d858e762ad008d9501bf3b931db08334e;hp=cbc57358d61d16a561eff18237693023da58472e;hpb=b4e87090e25c68f2ee17d5a63bfa213091121976;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.

+way. They all end in the usual "_r" suffix.


@@ -52,11 +58,11 @@ way. They all end in the usual ``_r'' suffix.

In order to use librrd in multi-threaded programs you must:

  • -

    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.

    @@ -121,8 +127,8 @@ 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

    +field to the 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